The problem with removing ALL non-keyboard characters is that the needed hidden characters will be deleted too.
The file is generated from mysql, then dumped to a file. The file will be sed to replace the comma with |. The | is the colseparator on the mysql.
I don't know much about chomp. I'll be researching on that.
---------- Post updated at 05:50 PM ---------- Previous update was at 05:33 PM ----------
Quote:
perl -i -pe 's/[^\x20-\x7f]//g' filename.csv
This one worked. But it removed all the Hidden Characters.
I just want to remove the hidden character on 'InterUnit
$' string and its result from sql query.
InterUnit column will give a Y or N result from the database.
---------- Post updated 06-24-11 at 02:40 PM ---------- Previous update was 06-23-11 at 05:50 PM ----------
Hi all, I am now facing a more complicated problem with hidden characters '$'.
I noticed that the '$' characters are printed in a particular pattern resulting for my CSV file to produce incorrect format upon the execution of the ksh on Linux.
Do you guys know how to remove unnecessary hidden characters on Linux in ksh?
There are unnecessary '$' characters on my output file, but not all '$'. As we know, '$' is like \n on hidden character when we used "set list" in vi.
If my question is unclear, please let me know how could I elaborate it better.