From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from 24-148-111-2.ip.mhcable.com ([24.148.111.2] helo=smtp.mhcable.com) by speech.braille.uwo.ca with esmtp (Exim 3.36 #1 (Debian)) id 1DSyBR-00084Z-00 for ; Tue, 03 May 2005 10:15:33 -0400 Received: from localhost (localhost [127.0.0.1]) by deliver.mhcable.com (Postfix) with ESMTP id 9F1DAE721E for ; Tue, 3 May 2005 10:15:31 -0400 (EDT) Received: from smtp.mhcable.com (localhost [127.0.0.1]) by localhost (VaMailArmor-2.0.1.16) id 23388-28DA3807; Tue, 03 May 2005 10:15:31 -0400 Received: from hhs48.com (24-105-197-112.cm.mhcable.com [24.105.197.112]) by smtp.mhcable.com (Postfix) with ESMTP id 6D78CE720C for ; Tue, 3 May 2005 10:15:31 -0400 (EDT) Received: from chuckh (helo=localhost) by hhs48.com with local-esmtp (Exim 4.50) id 1DSyBP-0004QJ-Qj for speakup@braille.uwo.ca; Tue, 03 May 2005 10:15:31 -0400 Date: Tue, 3 May 2005 10:15:31 -0400 (EDT) From: Charles Hallenbeck To: "Speakup is a screen review system for Linux." In-Reply-To: <006401c54fcd$48867af0$6401a8c0@geekspeak> Message-ID: References: <002001c54f54$c8466170$c2a9e744@nedelko83f1172> <20050502205023.GA10916@taylor.homelinux.net> <05b801c54f59$c31a6de0$6401a8c0@geekspeak> <006401c54fcd$48867af0$6401a8c0@geekspeak> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-AntiVirus: checked by Vexira MailArmor (version: 2.0.1.16; VAE: 6.28.0.18; VDF: 6.28.0.106; host: smtp.mhcable.com) Subject: Re: can't invoke sed properly... X-BeenThere: speakup@braille.uwo.ca X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "Speakup is a screen review system for Linux." List-Id: "Speakup is a screen review system for Linux." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2005 14:15:33 -0000 Yes, you must mention the filename on the command line instead of redirecting or piping it. My version is 4.1.2, and I am not sure how long this option has been available. You are right about the dangers of redirecting both input and output using the same file, but I guess if you know about the -i option you might not be tempted to do that. On Tue, 3 May 2005, Laura Eaves wrote: > This may be a newer implementation of sed. The one I ran while working on > the said project (no pun intended) did indeed have a silent buffer limit and > the bug was a real bear to find but easy to fix -- we just changed to awk, > which is more flexible and powerful than sed. > I hadn't heard of the -i option, but I don't deny it exists. > But my question is this: don't you have to put the file on the command line > when using -i rather than just redirecting with the shell > sign? > So you'd presumably have > sed -i pattern filename > and sed would edit filename in place. > Nice feature. > > But note that clobbering an input file by naming it also as the output file > is a common mistake newbies make with many commands and it is a good idea to > point it out so the user will beware. > > Cheers. > --le -- The Moon is Waning Crescent (25% of Full) "Things are in the saddle, and they ride mankind." Ralph Waldo Emerson Visit my download site at http://www.mhcable.com/~chuckh