From owner-freebsd-questions@FreeBSD.ORG Mon Jan 3 23:44:05 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 785AC16A4CE for ; Mon, 3 Jan 2005 23:44:05 +0000 (GMT) Received: from rosebud.otenet.gr (rosebud.otenet.gr [195.170.0.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 74ED843D1F for ; Mon, 3 Jan 2005 23:44:04 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.gr (patr530-a132.otenet.gr [212.205.215.132]) j03Nhen6020427; Tue, 4 Jan 2005 01:43:51 +0200 Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.13.1/8.13.1) with ESMTP id j03Nha3o045239; Tue, 4 Jan 2005 01:43:37 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.gr (8.13.1/8.13.1/Submit) id j03NhaNQ045238; Tue, 4 Jan 2005 01:43:36 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Tue, 4 Jan 2005 01:43:36 +0200 From: Giorgos Keramidas To: Michael Madden Message-ID: <20050103234336.GD44980@gothmog.gr> References: <20050101032022.GA1890@cmsrtp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050101032022.GA1890@cmsrtp.com> cc: freebsd-questions@freebsd.org Subject: Re: Programming with Bourne or C shell X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jan 2005 23:44:05 -0000 On 2004-12-31 21:20, Michael Madden 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