The 'script' utility output normally has ^M and other control characters embedded in the output. To have all these control characters removed,
try: $ col -b < script.txt > newfile.txt Regards, Siva On Wed, 2008-05-21 at 16:45 +0800, Remy Guo wrote: > hi all, > i have a text processing script that can work with a file but cannot work > with another file that has the same content. > as i compared the 2 files, i found the file that cannot work has a "^M" at > the end of each line. what is this? is this what made it not work? > by the way, i'm under unix. > thanks.... > > -Remy