aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xwrappers/dos2unix5
-rwxr-xr-xwrappers/tac7
-rwxr-xr-xwrappers/unix2dos5
3 files changed, 17 insertions, 0 deletions
diff --git a/wrappers/dos2unix b/wrappers/dos2unix
new file mode 100755
index 00000000..9eab6644
--- /dev/null
+++ b/wrappers/dos2unix
@@ -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$//' "$@"
diff --git a/wrappers/tac b/wrappers/tac
new file mode 100755
index 00000000..6253b70f
--- /dev/null
+++ b/wrappers/tac
@@ -0,0 +1,7 @@
+#!/bin/sh
+# HELP usage: tac [FILE...]\n\nPrint input lines in reverse order
+
+for i in "$@"
+do
+ sed -e '1!G;h;$!d' "$i"
+done
diff --git a/wrappers/unix2dos b/wrappers/unix2dos
new file mode 100755
index 00000000..68c18593
--- /dev/null
+++ b/wrappers/unix2dos
@@ -0,0 +1,5 @@
+#!/bin/sh
+#HELP usage: unix2dos [FILE...]\n\nAdd DOS newlines
+
+[ $# -ne 0 ] && DASH_I=-i
+sed $DASH_I -e 's/$/\r/' "$@"