pipe (|) limited text file is transferred from Windows application for processing. While processing there is a special character in the first column in first line of the file. This is how file looks in notepad before transferring from Windows
Sector|Name|Manager|...
When I read IFS='|' read -r -a fields < "/uploads/file_data.txt"
, the first column sector is read as "Sector"
with special characters prefixed.
When i do this head -1 "/uploads/file_data.txt" | od -c
the value printed is
0000000 357 273 277 S e c t o r |
I tried tr -d < //uploads/file_data.txt > /uploads/file_data_temp.txt
but dint help. How do i replace the special characters not only this if any unknown characters are in the file uploaded in future.