Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-standard shebang formatting #28

Open
jirutka opened this issue Sep 17, 2021 · 3 comments
Open

Non-standard shebang formatting #28

jirutka opened this issue Sep 17, 2021 · 3 comments

Comments

@jirutka
Copy link

jirutka commented Sep 17, 2021

I found the following shebang formatting in lesson 04:

#! /bin/bash

The problem is the space between #! and the command. I know that it’s a valid shebang, technically, but it’s very uncommon and students should not be taught to write it like that.

@encukou
Copy link
Owner

encukou commented Sep 27, 2021

Hm, is there a relevant standard? This is how I learned to write shebangs, and I find it a bit more readable.

@hegerj
Copy link
Contributor

hegerj commented Oct 25, 2021

Although I have always written it without a space I could not find any relevant reason to prefer one way over another. I say show students both and let them decide.

@jirutka
Copy link
Author

jirutka commented Oct 25, 2021

Sry, I forgot to answer. I don’t know about any relevant standard. However, I’m very active in FOSS world and maintain hundreds of packages in Alpine Linux, so I’ve seen really a lot of scripts with shebangs in my life. I can tell you that shebang with a space is extremely rare (like one in a thousand rare).

Sure, you can show students both, but you must/should choose one or another in your examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants