diff wrappers/dos2unix @ 411:7da386057101

Add three commands that can be done as simple shell scripts (one sed is in, anyway), and don't need to be implemented in C.
author Rob Landley <rob@landley.net>
date Sun, 22 Jan 2012 20:33:15 -0600
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wrappers/dos2unix	Sun Jan 22 20:33:15 2012 -0600
@@ -0,0 +1,5 @@
+#!/bin/sh
+#HELP usage: dos2unix [FILE...]\n\nRemove DOS newlines
+
+[ $# -ne 0 ] && DASH_I=-i
+sed $DASH_I -e 's/\r$//' "$@"