]> Dogcows Code - chaz/yoink/blobdiff - scripts/unix2dos.sh
remove some unused stlplus modules
[chaz/yoink] / scripts / unix2dos.sh
diff --git a/scripts/unix2dos.sh b/scripts/unix2dos.sh
new file mode 100755 (executable)
index 0000000..41e4085
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+#
+# Yoink
+# An implementation of unix2dos using sed.
+#
+
+if [ -f "$1" ]
+then
+       TMPFILE="$1.$$"
+       sed 's/\r*$/\r/' "$1" >$TMPFILE
+       if [ ! "$2" ]
+       then
+               mv -f "$TMPFILE" "$1"
+       else
+               mv -f "$TMPFILE" "$2"
+       fi
+       rm -f "$TMPFILE"
+else
+       echo "`basename $0` infile [outfile]"
+       echo "  convert a text file from unix to dos line-endings"
+       exit 1
+fi 
+
This page took 0.023542 seconds and 4 git commands to generate.