awk : delete ^M at the end of the line

Hi all,

I'm newbi in scripting.

could someone tell how to delete the ^M at the end of the linie with an awk command.

many thanks in advance.

Please click on the rules link at the bottom of the page. Note the rule about searching the forum first. Had you followed that rule, you might have found this thread or one of the other dozens of threads asking the very same question.

To still make this thread worth reading I have a supplement in the shown thread.

When opening the file using vi, you can do the following :

:1,$s/<CTRL>+<v> <CTRL>+<m>//g

So you press <CTRL>+<v> to specify a special character called <CTRL>+<m>. You replace it with nothing. Works very fast !!

Regs David