From owner-freebsd-newbies@FreeBSD.ORG Fri Dec 31 08:53:44 2004 Return-Path: Delivered-To: freebsd-newbies@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F3D9416A4CE for ; Fri, 31 Dec 2004 08:53:43 +0000 (GMT) Received: from nuumen.pair.com (nuumen.pair.com [209.68.1.119]) by mx1.FreeBSD.org (Postfix) with SMTP id 7C43743D31 for ; Fri, 31 Dec 2004 08:53:43 +0000 (GMT) (envelope-from thuppi@nuumen.pair.com) Received: (qmail 71229 invoked by uid 55300); 31 Dec 2004 08:53:43 -0000 Date: Fri, 31 Dec 2004 03:53:43 -0500 (EST) From: Tom Huppi X-X-Sender: thuppi@nuumen.pair.com To: vijayendra gadgil In-Reply-To: Message-ID: References: <49B5BEF2.7CCF22F4.0F75C5EC@netscape.net> <1104458982.622.3.camel@chaucer> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-newbies@freebsd.org Subject: Re: Shell Games X-BeenThere: freebsd-newbies@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Gathering place for new users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 08:53:44 -0000 On Fri, 31 Dec 2004, vijayendra gadgil wrote: > On Fri, 31 Dec 2004 00:30:16 -0500 (EST), Tom Huppi wrote: > > FWIW, I've always used 'tcsh' interactively, but almost switched a > > while back out of disgust at not being able to figure out how to > > get a one-line foreach/{do_something}/end loop (which would allow > > me to re-run a complex command easily.) > > I would recommend 'ksh' it does the tasks of both 'csh' and 'sh' with > advanced programming features, check out http://www.kornshell.com/ As it happens, my attempts to do this one-liner with 'tcsh' were a direct result of watching someone who used 'ksh'. I thought it probable that 'bash' also could accomplish this feat (and maybe 'tcsh' also if I could figure it out.) Anyone know? IIRC, I solved the immediate issue with either find/-exec, or a ubiquitous and simple utility called 'checksed' (and it's friends.) After that, I ran out of incentive to change shells :) This being the newbies list, I should like to mention that I've found both 'find' and 'checksed/runsed' to be really useful over the years. They are two things that I have been happy to have spend the effort necessary to learn what they are and their basic usage. Thanks, - Tom