Re: SNHELLO and sed: error?
Phil Richards <[email protected]>
| Newsgroups | gmane.network.sn |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Aug 03, 2004 at 10:47:52AM +0100, Ralph Corderoy wrote:
> > Looking at SNHELLO, I think I agree with sed... The
> > sed scrips are:
> > rmcr () { sed -e 's/
> > //' -e '/^\.$/d' >$tmp || end "Can't run sed"; }
> With this older version the ASCII LF you have are ASCII CR, i.e. you
> have \n, I have \r.
[output showing a definite '\r' not '\n' in od dump]
> How yours ended up like that I don't know. Some kind of `convert DOS
> carriage return' step?
I've just hx'd the tar-ball - this is what comes out:
[...]
077df0 73 2e 0a 23 0a 0a 74 6d 70 3d 2b 48 45 4c 4c 4f s..#..tmp=+HELLO
077e00 2e 24 24 0a 72 6d 63 72 20 28 29 20 7b 20 73 65 .$$.rmcr () { se
077e10 64 20 2d 65 20 27 73 2f 0a 2f 2f 27 20 2d 65 20 d -e 's/.//' -e
^^
077e20 27 2f 5e 5c 2e 24 2f 64 27 20 3e 24 74 6d 70 20 '/^\.$/d' >$tmp
077e30 7c 7c 20 65 6e 64 20 22 43 61 6e 27 74 20 72 75 || end "Can't ru
[...]
The tar-ball has a '\n' in it. Any translation occurred before it
got to me :-(
I wondered why nobody wanted to reply to my postings - having just
looked at outgoing, now I know :-)
Time for some judicious script hacking...
phil
--
Phil Richards, <[email protected]>
Derived Software Limited