Have you ever faced problem of removing
Control Characters from Multiple Files,
Here is the solution create script file
with following entries,
vi -c "%s/^M//g" -c "wq" junk1.c
vi -c "%s/^M//g" -c "wq" junk2.c
vi -c "%s/^M//g" -c "wq" junk3.c
vi -c "%s/^M//g" -c "wq" junk4.c
vi -c "%s/^M//g" -c "wq" junk5.c
vi -c "%s/^M//g" -c "wq" junk6.c
If the filename of this script file
is "xyz":
#./xyz
This will remove the control characters(^M)
from all the files junk1.c ... junk6.c
To create ^M = Holding the control
press 'v' & 'm'.
To create ^H = Holding the control press
'v' & 'h'.
This tip generously supported by: srikanbn@miel.mot.com
NOTE: All tips provided are USE AT YOUR OWN RISK. Tips are submitted
by various unix admins around the globe. UGU suggest you read and
test each tip in a non-volitile environment before placing into
production.