I guess that I need to state that the most of this stuff is intended for the bash shell. I don't know many people that use csh/tcsh anyway :/
bash
That wasn't clear, especially after the first part which recommended to use #!/bin/sh...
#!/bin/sh
Gonna address that later, thanks for the advice! I've never used BSD nor csh before, so I'm not that familiar with differences between distros and shells, as I'm almost exclusively using bash/zsh for my job.
This table might help. The ksh (AIX/OpenBSD default shell) does not differ that much from POSIX, the csh does.
ksh
csh
sh
ash
dash
zsh: massive extensions on top of sh but different ones to bash
zsh
csh: a completely different shell to sh, contemporary in origin, mostly different syntax
tcsh: extensions on top of csh
tcsh
fish: a completely different shell again, cut-down syntax and features mostly targeted at interactive users
fish
So, yeah, it's important to specify which shell you're targeting.
Thanks for the info. I've updated the posts with shell reqs. 😊
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I guess that I need to state that the most of this stuff is intended for the
bash
shell. I don't know many people that use csh/tcsh anyway :/That wasn't clear, especially after the first part which recommended to use
#!/bin/sh
...Gonna address that later, thanks for the advice! I've never used BSD nor csh before, so I'm not that familiar with differences between distros and shells, as I'm almost exclusively using bash/zsh for my job.
This table might help. The
ksh
(AIX/OpenBSD default shell) does not differ that much from POSIX, thecsh
does.sh
: the basics, POSIX standardash
: reimplementation ofsh
dash
: port ofash
ksh
: extensions on top ofsh
bash
: massive extensions on top ofsh
(mostly a superset ofksh
's)zsh
: massive extensions on top ofsh
but different ones tobash
csh
: a completely different shell tosh
, contemporary in origin, mostly different syntaxtcsh
: extensions on top ofcsh
fish
: a completely different shell again, cut-down syntax and features mostly targeted at interactive usersSo, yeah, it's important to specify which shell you're targeting.
Thanks for the info. I've updated the posts with shell reqs. 😊