Initial commit
This commit is contained in:
commit
d3c6e29902
202 changed files with 3909 additions and 0 deletions
22
remove_first_lines
Executable file
22
remove_first_lines
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
#!/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"
|
||||
Loading…
Add table
Add a link
Reference in a new issue