From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1576 invoked by alias); 11 Sep 2002 18:42:05 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 1569 invoked from network); 11 Sep 2002 18:42:04 -0000 Received: from unknown (HELO slinky.cs.nyu.edu) (128.122.20.14) by sources.redhat.com with SMTP; 11 Sep 2002 18:42:04 -0000 Received: from localhost (pechtcha@localhost) by slinky.cs.nyu.edu (8.11.6+Sun/8.11.6) with ESMTP id g8BIg3Z11319; Wed, 11 Sep 2002 14:42:03 -0400 (EDT) X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs Date: Wed, 11 Sep 2002 12:39:00 -0000 From: Igor Pechtchanski Reply-To: cygwin@cygwin.com To: Joe Buehler cc: cygwin@cygwin.com Subject: Re: Beginnings of a patch: /etc/hosts In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2002-09/txt/msg00544.txt.bz2 On Wed, 11 Sep 2002, Joe Buehler wrote: > Igor Pechtchanski wrote: > > > + WFILE=`echo $FILE | sed 's/^\(.\{0,8\}\).*/\1/'` > > If you think that inelegant, try using this: > > expr substr "$FILE" 1 8 > > Joe Buehler Well, it's certainly more readable (especially to someone who knows of the existence of 'substr' :-D). Thanks. I'll include it in the next version... Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha@cs.nyu.edu ZZZzz /,`.-'`' -. ;-;;,_ igor@watson.ibm.com |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! It took the computational power of three Commodore 64s to fly to the moon. It takes a 486 to run Windows 95. Something is wrong here. -- SC sig file -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/