diff options
Diffstat (limited to 'funtools/txt/nlcr')
-rwxr-xr-x | funtools/txt/nlcr | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/funtools/txt/nlcr b/funtools/txt/nlcr new file mode 100755 index 0000000..a623bbd --- /dev/null +++ b/funtools/txt/nlcr @@ -0,0 +1,20 @@ +#!/bin/sh + +case $# in + 0) + tr '\012' '\015' + break;; + + 1) + tr '\012' '\015' < $1 + break;; + + 2) + tr '\012' '\015' < $1 > $2 + break;; + + *) + echo "args: 0 (stdin/stdout), 1 (ifile/stdout), or 2 (ifile/ofile)" + exit 1;; +esac + |