At 15:54 2000-06-13 -0600, SoloCDM wrote:
>A simple problem with a complicated solution.
>
>Everything works except sed, and that's a return after "<img" as it is
>in the file. The problem is hopefully just the forward slashes and
>how to get sed to treat them as symbols and not directives, with only
>the three essential forward slash directives remaining.
>
>3D and <agent> are dummies to omit the link from the message. The
>output is pulled from a file on each occasion with grep, so the return
>after "<img" is retained in the variable.
>
># Command:
>
>sed 's/$MCHECK//'
>
># Output from file:
>
><img
>src="3Dhttp://www.<agent>.com/images/blankpixel.gif/Key=3095.LZmR.V8Eyd">
I poked around in sed for a while, but decided that it would be a lot
easier to pipe it into this perl script:
#!/usr/bin/perl
#
while ($line = <STDIN>) {
if ($line =~ /^<img$/) {
chomp($line);
$line .= ' ';
}
print "$line";
}
The output puts the whole img tag on a single line.
Tony
--
Anthony E. Greene <[EMAIL PROTECTED]>
PGP Key: 0x6C94239D/7B3D BD7D 7D91 1B44 BA26 C484 A42A 60DD 6C94 239D
Linux: The choice of a GNU Generation.
--
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.