I have such data file. | 's ascii is 0x7C.
$cat mydatafile
0001|NameOne|60|70
I have to get the NameOne field. I use
Code:
while read line
do
nameField=`echo $line| awk -F"|" '{print $2}'`;
mathscore=`echo $line| awk -F"|" '{print $3}'`;
done < mydatafile
I thought it's easy. But I encounter UNICODE problem.
when the name(UNICODE) field have 0x7C, it goes wrong.
Is there any solution for this? I hope I make the problem clear. Thanks in advance!