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,22 @@
#!/usr/bin/lasso9
local(
orgfilename = $argv -> second,
file = file(#orgfilename),
regexp = regexp(-find = `(?m)$`),
content = #regexp -> split(-input = #file -> readstring) -> asarray,
start = integer($argv -> get(3) || 1),
range = integer($argv -> get(4) || 1)
)
stdout(#content)
#file -> copyto(#orgfilename + '.org')
fail_if(#content -> size < (#start + #range), -1, 'Not that many rows in the file')
#content -> remove(#start, #range)
#file = file(#orgfilename)
#file -> opentruncate
#file -> dowithclose => {
#file -> writestring(#content -> join(''))
}

View file

@ -0,0 +1 @@
./removelines textfile.txt 2 2