Re: sed/awk/fmt question hijacked from Re: Program for quoting text like in email?

2009-06-10 Thread Johannes Wiedersich
Cameron Hutchison wrote: > You can combine these into a single sed invocation: > > set -i -e "/.gconf/d" -e "/.java/d" script s/set/sed/ ;-) Johannes -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.or

Re: sed/awk/fmt question hijacked from Re: Program for quoting text like in email?

2009-06-09 Thread Brian Wells
On Tue, 2009-06-09 at 20:09 -0700, Brian Wells wrote: [...] > You could have done > > sed -e "/.gconf/d" script | sed -e "/.java/d" >script > Oops. I forgot that this will try to read and write script at the same time. Won't work. But you can still link together many commands, so long as you

Re: sed/awk/fmt question hijacked from Re: Program for quoting text like in email?

2009-06-09 Thread Brian Wells
On Mon, 2009-06-08 at 22:14 -0400, Tony Baldwin wrote: > Spiro Harvey wrote: > >> Can anyone recommend a program/shell script/editor plugin etc, that > >> can take arbitrary text as input and quote it like email programs > >> quote emails with a preceding "> " character? > > > > > > awk '{print

Re: sed/awk/fmt question hijacked from Re: Program for quoting text like in email?

2009-06-09 Thread Boyd Stephen Smith Jr.
In <4a2dc587.60...@gmail.com>, Tony Baldwin wrote: >Why is it that with sed, stuff like >sed -e /searchterm/d >I have to do >sed -e /searchterm/d infile > outfile, >and can't just do sed -e /searchterm/d file, without having to generate >another file? Traditional sed is very simple. It doesn't "k

Re: sed/awk/fmt question hijacked from Re: Program for quoting text like in email?

2009-06-09 Thread Eduardo M KALINOWSKI
On Seg, 08 Jun 2009, Tony Baldwin wrote: I've been learning to use sed and awk and grep, etc., lately. I have a general question (probably more appropriate elsewhere, but I'm going to ask here anyway. Smack me later.). Bad, very bad. Why is it that with sed, stuff like sed -e /searchterm/d

Re: sed/awk/fmt question hijacked from Re: Program for quoting text like in email?

2009-06-08 Thread Cameron Hutchison
Tony Baldwin writes: >Why is it that with sed, stuff like >sed -e /searchterm/d >I have to do >sed -e /searchterm/d infile > outfile, >and can't just do sed -e /searchterm/d file, without having to generate >another file? GNU sed (which is what you are most likely running) has the -i option to

Re: sed/awk/fmt question hijacked from Re: Program for quoting text like in email?

2009-06-08 Thread Richard Hector
On Mon, 2009-06-08 at 22:14 -0400, Tony Baldwin wrote: > > I've been learning to use sed and awk and grep, etc., lately. > I have a general question (probably more appropriate elsewhere, but I'm > going to ask here anyway. Smack me later.). > > Why is it that with sed, stuff like > sed -e /sea

sed/awk/fmt question hijacked from Re: Program for quoting text like in email?

2009-06-08 Thread Tony Baldwin
Spiro Harvey wrote: Can anyone recommend a program/shell script/editor plugin etc, that can take arbitrary text as input and quote it like email programs quote emails with a preceding "> " character? awk '{print "> " $0}' filename or just type: awk '{print "> " $0}' paste some text into t