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

Don't use CRLF and add shebang on .sh files #2

Open
ghost opened this issue Jan 6, 2016 · 2 comments
Open

Don't use CRLF and add shebang on .sh files #2

ghost opened this issue Jan 6, 2016 · 2 comments

Comments

@ghost
Copy link

ghost commented Jan 6, 2016

Shellscripts should use default linux line endings, which is LF, not CRLF. Also they should include #!/bin/sh shebang in the first line.

@arpruss
Copy link
Owner

arpruss commented Jan 7, 2016

It's probably safer to launch them explicitly with sh filename.sh. That way we minimize the number of files with executable permissions. And I'm using Windows.

@ghost
Copy link
Author

ghost commented Jan 8, 2016

I don't think adding the shebang will hurt, especially since it's not related to being executable or not. For the reference: Your scale.sh is executable while both to*.sh are not.

Also sh might accept CRLF on Windows, it will most likely accept LF as well, which is the correct line termination for unix shells (even when not run in a *nix environment).

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

1 participant