Unix2dos

From wikipost
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

A simple but effective script that inserts the /r (Carriage Return) character for DOS-based text files so that you don't have long, continous lines when viewing under windows.


#!/bin/sh

echo "unix2dos"
for file in "$@"
do  
  awk 'sub("$", "\r")' $file > $file.dos
done