On 01/18/2019, at 16:57, Dante Majorana <[email protected]
<mailto:[email protected]>> wrote:
> My goal is to delete the same PARAGRAPHS in a series of TXT files
>
> The paragraphs I need to delete are always the same
>
> Beginning from par at line 9, then . line 7 then line 3
Hey Dante,
You can do that like this:
tell application "BBEdit"
tell front text window
delete line 9
delete line 7
delete line 3
end tell
end tell
Or like this:
tell application "BBEdit"
tell front text window
delete line 3
delete line (7 - 1)
delete line (9 - 2)
end tell
end tell
Or you can use a text filter like this:
#!/usr/bin/env bash
sed '
3d
7d
9d
'
The text filter is a bit more efficient, because it does everything at once –
and therefore undo is only 1 step instead of 3.
--
Best Regards,
Chris
--
This is the BBEdit Talk public discussion group. If you have a
feature request or need technical support, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <https://www.twitter.com/bbedit>
---
You received this message because you are subscribed to the Google Groups
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/bbedit.