mirror of the now-defunct rocklinux.org
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
#!/bin/sh
m=10
useage () { echo "Usage: head [OPTION]... [FILE]..." echo -e "\t-n,-[0-9]+\tprint first NUMBER lines instead of first 10" exit 1 }
while [ "$1" ] ; do case "$1" in -n) m="$2" ; shift ; shift ;; -[0-9]*) m=${1#-}; shift ;; -*) useage ;; *) break; esac done
exec grep -m$m "" $*
|