diff options
Diffstat (limited to 'compat/plan9/head')
-rwxr-xr-x | compat/plan9/head | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/compat/plan9/head b/compat/plan9/head new file mode 100755 index 0000000000..2840b2d50f --- /dev/null +++ b/compat/plan9/head @@ -0,0 +1,10 @@ +#!/bin/sh + +n=10 + +case "$1" in + -n) n=$2; shift 2 ;; + -n*) n=${1#-n}; shift ;; +esac + +exec sed ${n}q "$@" |