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 "know" how to "save" the data it is going to read before overwriting it or truncate the file after it is done writing. It just reads some bytes and writes some other bytes. Because of this, operating on the same set of bytes for both reading and writing could give disastrous results. GNU sed is much more featureful. It has the '-i' option to do an "in place" sed. -- Boyd Stephen Smith Jr. ,= ,-_-. =. b...@iguanasuicide.net ((_/)o o(\_)) ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-' http://iguanasuicide.net/ \_/
signature.asc
Description: This is a digitally signed message part.