summaryrefslogtreecommitdiff
path: root/applets_sh/dos2unix
diff options
context:
space:
mode:
Diffstat (limited to 'applets_sh/dos2unix')
-rwxr-xr-xapplets_sh/dos2unix5
1 files changed, 5 insertions, 0 deletions
diff --git a/applets_sh/dos2unix b/applets_sh/dos2unix
new file mode 100755
index 0000000..0fd5206
--- /dev/null
+++ b/applets_sh/dos2unix
@@ -0,0 +1,5 @@
+#!/bin/sh
+# TODO: use getopt to avoid parsing options as filenames,
+# and to support -- and --help
+[ $# -ne 0 ] && DASH_I=-i
+sed $DASH_I -e 's/\r$//' "$@"