Quote:
Originally Posted by
quirkasaurus
Unfortunately, you really can't avoid the cost of fixing this file.
it's going to take some time and disk space.
What's the next step, loading it into a database?
If that's the case -- you will be able to do the read,
weird character removal and insert-into-the-database
all in perl -- that's be fairly cost effective.
If you're interested in that solution, lemme know.
Hi,
My requirement is that I store this string in suppose say
$string...and compare it with a parameter that is input say
$param ...
like
if [ $string = $param ]
then
echo 'True'
else
echo 'False'
fi
This $string is part of header (i.e another big string) which can be treated as a record (line) and this $string appears at the end of line. I fetch it based on positions...for ex: 30 to 60. In case the $string is of length 10 only, 11th character i.e, at position 41 there'll be this box like character (since I'm fetching 30 to 60 into $string). This character doesn't get trimmed. And since this box like character is present my comparision returns 'False' even when it's 'True'.
I have tried things like
string=`echo $string|tr -d '\n'`
and \t, \r, \222,\221---Ascii equivalents...and all that and then thought its not Ascii at all.
Still I couldn't solve this. Please help