23 lines
350 B
Text
23 lines
350 B
Text
|
#!/bin/sh
|
||
|
#
|
||
|
# Nico Schottelius <nico-linux@schottelius.org>
|
||
|
# Date: 15-Sep-2004
|
||
|
# Last Modified: -
|
||
|
#
|
||
|
# Removes the first n lines
|
||
|
|
||
|
if [ $# -ne 2 ]; then
|
||
|
echo "$0: "'<lines_to_cut> <file>'
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
CUT_LINES=$1
|
||
|
FILE=$2
|
||
|
|
||
|
LINES=`cat "$FILE" | wc -l`
|
||
|
|
||
|
TAIL_LINES=`echo "${LINES}-${CUT_LINES}" | bc`
|
||
|
echo $TAIL_LINES
|
||
|
|
||
|
tail -n "$TAIL_LINES" "$FILE"
|