I am new to shell script.
Do kindly help me remove junk character from a file having a million records.. As it is production setup do kindly advice
Do kindly explain exactly what you need. Junk character means nothing.
Junk character like ^M,#,$
That "^M" is a unix line end, use the dos2unix command first. For the rest use sed.
sed -e 's/[^ -~]//g' file_in > file_out
This really works
i have used this command but how to use it when we do not know how many time it will be repeated????