#!/bin/bashor#!/bin/sh?
Which one should I use in my shell scripts and why?
And it's important or it's just a comment?
'how do I greentext'
fuck mate what happened to your formatting
i personally use#!/usr/bin/env bashor#!/usr/bin/env sh, depending on shell I want. bash has more features than sh and there are differences in the language.
You should specify exactly what you wrote the script for. Probably bash.
sh is usually a symlink to whatever the default shell is for that OS. On some distros it's "dash" not bash, so you should specify bash in your script if that's what you're using. There are some difference between the two that can break your scripts.
>>53745832
more bash/dash info
https://wiki.ubuntu.com/DashAsBinSh
>>53745813
Maybe it's because here is 03:25 AM.
>>53745813
This. Always use env unless you're writing a low level boot script, in which case use /bin/sh.
>>53745813
>>53746762
Why should I use env if I'm always going to run the scripts from a terminal that already has all the environmental variables that I want set?
Not being facetious, genuinely interested if this is useful.