summaryrefslogtreecommitdiff
path: root/rc/bin/ape/cat
diff options
context:
space:
mode:
Diffstat (limited to 'rc/bin/ape/cat')
-rwxr-xr-xrc/bin/ape/cat18
1 files changed, 18 insertions, 0 deletions
diff --git a/rc/bin/ape/cat b/rc/bin/ape/cat
new file mode 100755
index 000000000..be6de075b
--- /dev/null
+++ b/rc/bin/ape/cat
@@ -0,0 +1,18 @@
+#!/bin/rc
+
+rfork e
+
+files=()
+while(! ~ $#* 0){
+ switch($1){
+ case -
+ files=($files /fd/0)
+ case -*
+ ;
+ case *
+ files=($files $1)
+ }
+ shift
+}
+
+exec /$cputype/bin/cat $files