Re:Introduction to FreeBSD for Linux Users
by hetman on Wednesday January 14, 2015 @03:24PM
(#8888777)
I would be interested to know the reasoning behind using different shells for interactive sessions vs. scripting on FreeBSD. Wouldn't it be easier to pick one for both? Is this just historical legacy?
[ Parent
| on HN ]
Re:Introduction to FreeBSD for Linux Users
by smhenderson on Wednesday January 14, 2015 @03:37PM
(#8888854)
I'm not sure why FreeBSD defaults to csh for interactive use other than it's probably just developer preference on their part. But for scripting, this old gem kept coming up for me when reading about FreeBSD:
http://www.perl.com/doc/FMTEYEWTK/versus/csh.whynot
It's basically a bunch of reasons why c shell scripting is not recommended...
Re:Introduction to FreeBSD for Linux Users
by talideon on Wednesday January 14, 2015 @05:59PM
(#8889738)
You can blame Bill Joy for that. Allegedly, it was him who made csh the default root shell way back in the day. The reason it was never changed to sh or ksh subsequently is simply that it was never that big a deal: tcsh is a solid interactive shell, it sucks for scripting.
Re:Introduction to FreeBSD for Linux Users
by sophacles on Wednesday January 14, 2015 @03:26PM
(#8888789)
Many linux distros do this too... e.g. debian based systems default to bash or zsh for interactive shells, and use dash for /bin/sh (aka scripting).
Re:Introduction to FreeBSD for Linux Users
by hetman on Wednesday January 14, 2015 @08:32PM
(#8890385)
True but dash and bash are mostly interchangeable. I should have clarified that what was strange to me was the choice of shells with incompatible syntax.
Re:Introduction to FreeBSD for Linux Users
by aruggirello on Wednesday January 14, 2015 @04:43PM
(#8889325)
Ubuntu does it too. That's the reason debian and Ubuntu weren't hit too hard by the Bash bug.