[ale] sed help
Geoffrey
esoteric at 3times25.net
Sat Jan 28 00:57:34 EST 2006
Robert Coggins wrote:
> This will not be possible.
Now that sounds like a challenge if ever I heard one. You can do it
with awk or perl. I don't know if it can be done with sed.
I'm really too tired to play with it right now. But here's something to
chew on.
Take the approach that you're going to build a long string to print out.
Read one line at a time and append the lines together according to your
set rules.
So you start off with:
while(<>) {
chomp;
$string .= $_;
if ($string =~ /,,,,/) {
$string .= $_;
} else {
$string .= "\n" . $string;
}
}
Now that's just a start, it's not your final work. But it can be done,
I'm just too tired right now.
--
Until later, Geoffrey
More information about the Ale
mailing list