in reply to Getopt, regexen, and newlines
Incidentally, there is a shell tool that will squeeze newlines.
I'm afraid your script has no real advantage over the one-liner:tr -s '\n' < file > file.squeezed
or the essentially-the-sameperl -pe 's/from-expression/to-expression/g' file > new_file
sed 's/from-expression/to-expression/g' file > new_file
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Getopt, regexen, and newlines
by apotheon (Deacon) on Oct 12, 2005 at 18:40 UTC | |
by Roy Johnson (Monsignor) on Oct 12, 2005 at 18:54 UTC | |
by apotheon (Deacon) on Oct 12, 2005 at 19:02 UTC |