]> Dogcows Code - chaz/yoink/blob - tools/unix2dos
new tool for converting unix to dos file format
[chaz/yoink] / tools / unix2dos
1 #!/bin/sh
2
3 # An implementation of unix2dos using sed.
4 # Written by Charles McGarvey; released into the public domain.
5
6 if [ -f "$1" ];
7 then
8 TMPFILE="$1.$$"
9 sed 's/\r*$/\r/' "$1" >$TMPFILE
10 if [ ! "$2" ];
11 then
12 cp -f "$TMPFILE" "$1"
13 else
14 cp -f "$TMPFILE" "$2"
15 fi
16 rm -f "$TMPFILE"
17 else
18 echo "`basename $0` infile [outfile]"
19 echo " convert a file from unix to dos file format"
20 exit 1
21 fi
22
This page took 0.0409350000000001 seconds and 5 git commands to generate.