In <4A2DC587.firstname.lastname@example.org>, 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. ,= ,-_-. =. email@example.com ((_/)o o(\_)) ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-' http://iguanasuicide.net/ \_/
Description: This is a digitally signed message part.