Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
error() {
|
||||
echo >&2 "$0: $*"
|
||||
exit 1
|
||||
}
|
||||
|
||||
[ $# -ne 3 ] && error "Incorrect number of parameters"
|
||||
|
||||
file=$1
|
||||
start=$2
|
||||
count=$3
|
||||
end=`expr $start + $count - 1`
|
||||
|
||||
[ -f "$file" ] || error "$file does not exist"
|
||||
|
||||
sed "$start,${end}d" "$file" >/tmp/$$ && mv /tmp/$$ "$file"
|
||||
|
|
@ -0,0 +1 @@
|
|||
sed -i "$start,${end}d" "$file"
|
||||
|
|
@ -0,0 +1 @@
|
|||
sed -i "" "$start,${end}d" "$file"
|
||||
Loading…
Add table
Add a link
Reference in a new issue