Closed zenny closed 4 years ago
Yes, the FreeBSD default shell is csh. Which I consider...less than great, so I used to always switch my login shell to tcsh, which is better. But both are awful for scripting. Initially I tried very hard to get the suite of scripts to play nicely with *csh
, but running sh scripts under a *csh login always left something broken. That's why the very first line in the instructions is sudo sh
. Once you're running under a sh/bash shell, then the behavior is deterministic.
Won't it be good to add a line on top to change fromcsh to sh shell?
On top of what? Does not every file already have a shebang line of #!/bin/sh
. What more are you asking for?
Thanks, what I meant was to export $SHELL=/bin/sh
for the specific session. Anyway it works great. Your explanations are pretty comprehensive and to the point, admirable @msimerson! Thank you.
Hi @msimerson :+1:
Great script. However, the default FreeBSD shell is
csh
which the script refuses to run under in my case.Won't it be good to add a line on top to change from
csh
tosh
shell?I had to exectute
/bin/sh
to get the script running, fyi.Cheers, and stay safe /z