STOP USING #!/bin/bash NOT EVERY SYSTEM IS LINUX. STOP WRITING BASHISMS AND USING #!/bin/sh AS YOUR SHEBANG. FUCKING HELL GUYS.
-
-
Replying to @Hacker_Horse
But we are too young... All we know is bash...
1 reply 0 retweets 11 likes -
-
Replying to @Hacker_Horse
Well I use /bin/bash and I do not know what is a bashism because I have never really used a true sh :)
4 replies 0 retweets 9 likes -
Replying to @roidelapluie
oh. Well don't use #!/bin/bash. Use #!/usr/bin/env bash
7 replies 5 retweets 66 likes -
Replying to @Hacker_Horse @roidelapluie
a bashism is a construct specific to bash, that doesn't exist in other implementations of sh.
2 replies 2 retweets 6 likes -
Replying to @Hacker_Horse @roidelapluie
they're not inherently bad but you should always specify #!/usr/bin/env bash if you're using them.
4 replies 1 retweet 14 likes -
Replying to @Hacker_Horse @roidelapluie
an example of a bashism would be [[ or ==
3 replies 0 retweets 9 likes -
Replying to @Hacker_Horse @roidelapluie
Do you happen to know of a linter to guard against bashisms? ShellCheck seems to presume you'll use them. I shebang with #!/bin/sh but can't say I check it against other shells >.>
3 replies 0 retweets 0 likes -
Now I'm confused (I'm not a born nixer) should it be #!/usr/bin/env bash or #!/bin/sh ?
2 replies 0 retweets 1 like
The idea is: don't use `#!/usr/ben/env bash` syntax with a #!/bin/sh shebang.
-
-
Ta!
0 replies 0 retweets 0 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.