[SunHELP] data manipulation

sunhelp at sunhelp.org sunhelp at sunhelp.org
Wed Nov 29 15:33:27 CST 2000


Fuerst, Robert C. wrote:
>I thought the best fix for this was dos2unix?

 Wouldn't IFS be the best (most efficient) fix for this situation?
i.e.-

#!/bin/sh
trap "" 2 3
echo "type something"
IFS="${IFS}`echo \"\r\c\"`" read inputVar trashVar
echo "request was " $inputVar
echo finished
exit
trap 2 3

>Van Niekerk, Ronelle wrote:
>>Hi guys,
>>I'm writing a script and have come across an irritating problem. THe
>>scripts accepts data eg: word, in from a tcp port and writes it to a file
>>as: word^M.
>>I know you can't see the ^M when you cat or more the file - but it is
>>still there.
>>Is there a command or environment setting that I can use that will tell my
>>script to ignore
this?




More information about the SunHELP mailing list