in reply to In place file modification
Seems like a lot of trouble only for this. Any other solution?It just seems like a lot of work because you wrote it in English instead of (perl) code. Also, writing the output somewhere else and then replacing the original is safer (and much less work) than modifying the original file in place.
If you have enough memory you can probably do it in one or two lines of code. But I suspect this is homework, so I'm not going to elaborate. See the -i & -p & -0 flags
updated: forgot to add the -0 flag.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: In place file modification
by RaduH (Scribe) on Nov 01, 2007 at 15:18 UTC |