I am copying a file from UNIX to an NT server where I have too put the end-of line characters on each record. To do this, I can run the file thru this awk, and it works fine:
awk '{FS="$"; print $1 "^M"}' unixfile > dosfile
Now, to go a step further, is there an easy way to tell if the unix file already has the ^M's, so I won't double them up?
awk '{FS="$"; print $1 "^M"}' unixfile > dosfile
Now, to go a step further, is there an easy way to tell if the unix file already has the ^M's, so I won't double them up?