Date: Tue, 4 Jan 2005 01:43:36 +0200 From: Giorgos Keramidas <keramida@ceid.upatras.gr> To: Michael Madden <madden@cmsrtp.com> Cc: freebsd-questions@freebsd.org Subject: Re: Programming with Bourne or C shell Message-ID: <20050103234336.GD44980@gothmog.gr> In-Reply-To: <20050101032022.GA1890@cmsrtp.com> References: <20050101032022.GA1890@cmsrtp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2004-12-31 21:20, Michael Madden <madden@cmsrtp.com> wrote: > I have most of my interactive shell experience using bash on Linux and > shell programing on Unix-like systems with Bourne shell. Since > FreeBSD's default shell is csh/tcsh, I was wondering if it's still > considered an atrocity to develop shell scripts with C shell: > > http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/ Yes. There is no good reason to use csh for batch shell scripts. On the contrary, as the URL quoted notes, there are many reasons why you shouldn't :-) > Are most FreeBSD users still using csh or tcsh has their interactive > shell and sh for programming? I think it would be nice to use the > same interactive and programming shell for consistency. I use sh(1) for shell scripting. Being able to write sh-like mini scripts on the command line, as the need arises, like: $ for fname in * ; do lname=`echo $fname | tr A-Z a-z` ; mv -i "${fname}" "${lname}" ; done is also a nice thing, so I mostly use bash for interactive stuff. - Giorgos
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050103234336.GD44980>