Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,13 @@
|
|||
removeLines "foobar.txt", 1, 2
|
||||
to handle removeLines fileName, startingLine, linesToRemove
|
||||
If there is no file fileName then
|
||||
put !"No such file: [[the folder & fileName]]"
|
||||
Return
|
||||
End if
|
||||
set endingLine to startingLine + linesToRemove - 1
|
||||
If endingLine is more than number of lines in file fileName then
|
||||
put !"Cannot delete lines past the end of the file ([[number of lines in file fileName]] lines)"
|
||||
Return
|
||||
End If
|
||||
delete lines startingLine to endingLine of file fileName
|
||||
end removeLines
|
||||
Loading…
Add table
Add a link
Reference in a new issue