Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -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"

View file

@ -0,0 +1 @@
sed -i "$start,${end}d" "$file"

View file

@ -0,0 +1 @@
sed -i "" "$start,${end}d" "$file"