diff options
Diffstat (limited to '')
-rw-r--r-- | examples/scripts/cat.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/examples/scripts/cat.sh b/examples/scripts/cat.sh new file mode 100644 index 0000000..3e65b3f --- /dev/null +++ b/examples/scripts/cat.sh @@ -0,0 +1,12 @@ +shcat() +{ + while read -r ; do + printf "%s\n" "$REPLY" + done +} + +if [ -n "$1" ]; then + shcat < "$1" +else + shcat +fi |