From owner-freebsd-questions@FreeBSD.ORG Fri May 12 16:58:57 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 2DACC16AE29 for ; Fri, 12 May 2006 16:58:57 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 12BCB43D45 for ; Fri, 12 May 2006 16:58:52 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.pc (aris.bedc.ondsl.gr [62.103.39.226]) (authenticated bits=128) by igloo.linux.gr (8.13.6/8.13.6/Debian-1) with ESMTP id k4CGwfvk004609 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Fri, 12 May 2006 19:58:44 +0300 Received: from gothmog.pc (gothmog [127.0.0.1]) by gothmog.pc (8.13.6/8.13.6) with ESMTP id k4CH0qW5026745 for ; Fri, 12 May 2006 20:00:52 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.pc (8.13.6/8.13.6/Submit) id k4CH0qqP026744 for freebsd-questions@freebsd.org; Fri, 12 May 2006 20:00:52 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Fri, 12 May 2006 20:00:52 +0300 From: Giorgos Keramidas To: freebsd-questions@freebsd.org Message-ID: <20060512170052.GD26040@gothmog.pc> References: <4464A94C.6020606@mac.com> <000d01c675dc$9a36dee0$01010101@avalon.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000d01c675dc$9a36dee0$01010101@avalon.lan> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (score=-3.397, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.80, BAYES_00 -2.60, DNS_FROM_RFC_ABUSE 0.20) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Subject: Re: Trimming Whitespace From Beginning and end of Text Lines X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2006 16:58:57 -0000 On 2006-05-12 17:56, "No@SPAM@mgEDV.net" wrote: >>> sed -i -e 's/^[[:space:]]*' -e 's/[[:space:]]*$//' file ... > > why not use just (you can change the "-" separator to "/" as above): > sed -e 's-^ *--g' -e 's- *$--g' Because this provides no additional help with the problem of not matching TABS and it looks very confusing so close to `-e' and other command-line options.