Thanks Again Chris
How can I loop this to a folder of choice?
I tried to insert it in your previous suggestion
but I receive various errors:

this is what I did

*tell* *application* "BBEdit"

*set* frontWin *to* *front* *text window*

*set* docIDList *to* ID *of* *documents* *of* frontWin *whose* on disk *is* 
*true*

*repeat* *with* docID *in* docIDList

*delete* *line* 3 *of* docID *in* docIDList

*delete* *line* (7 - 1) *of* docID *in* docIDList

*delete* *line* (9 - 2) *of* docID *in* docIDList

*end* *repeat*

*end* *tell*


*I get this error*


*error* "Can’t get docID of {116, 115, 114, 113, 112, 111, 109, 108, 107, 
106, 105, 104, 103, 102, 101, 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 
89, 88, 87, 84, 117, 118, 119, 110}." number -1728 from docID *of* {116, 
115, 114, 113, 112, 111, 109, 108, 107, 106, 105, 104, 103, 102, 101, 100, 
99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 84, 117, 118, 119, 110}

On Saturday, 19 January 2019 01:40:26 UTC+1, Christopher Stone wrote:
>
> On 01/18/2019, at 16:57, Dante Majorana <[email protected] <javascript:>> 
> 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.

Reply via email to