In article <9wGle.2067$rY6.354@newssvr13.news.prodigy.com>,
E Arredondo <atk@sbcglobal.net> wrote:
>I can't sed my file because I found out that, after I receive the data from
>a http call and then *cat*ing it to a file from a cgi-bin script it makes a
>file like this whit the message "Incomplete Last line" and neither *tr* or
>*sed* would work unless I *vi* the file and then save the file to get rid of
>that message "Imcomplete last line", then tr and sed will work fine:
>How can I fix this issue with the "Incomplete last line" ?
tr should work fine. sed does insist on a trailing newline. You can do:
{ cat file; echo ""; } | sed ...
to append a newline to its input. Or use awk, which doesn't have this problem;
replace
sed 's/foo/bar/'
with
awk '{sub(/foo/,"bar")}1'
John
--
John DuBois
spcecdt@armory.com KC6QKZ/AE
http://www.armory.com/~spcecdt/