Hoe to run multi file searches as a script or macro

2014-10-23 Thread mmb21003200
Hi,

I am not new to BBEdit but I have never done any scripting, and it seems 
that text factory will not do what I want so I am looking for pointers to 
scripts or whatever to do this:

1. Run multi finds using  a series of grep searches (not replaces). There 
might be up to 10 or more searches.
2. Put the output found (results) into one document so they are all 
together (prefixed by document path where they were found)

I know I can do this manually but I would really like it to be automated 
and guess it has to be applescript (or perl).

Many thanks.

---
Mark

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 

--- 
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 bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.


Re: Hoe to run multi file searches as a script or macro

2014-10-24 Thread mmb21003200
I can't get it working with the -f parameter, nothing is returned, but if I 
put regex inline then it is ok.

grep \@due  ~/Dropbox/Taskpaper/Main/*



I think it is probably better to go the applescript route. I am actually 
using BBEdit v11 on x.10 but had a similar problem on mavericks. The simple 
multi file find can probably be scripted to repeat itself, I had initially 
tried using process lines containing ... but this deletes all the non 
matching.


I do have some basic perl knowledge so may be able to do it using that 
instead, passing the files in as parameters, but they are in different 
nested folders.


BTW, how do I get commands to run in the Unix worksheet, cmd enter does not 
do anything ? (I need to RTFM).


Thanks again.


---

Mark




-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 

--- 
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 bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.


Re: Hoe to run multi file searches as a script or macro

2014-10-24 Thread mmb21003200

>
>
>
> BTW, how do I get commands to run in the Unix worksheet, cmd enter does 
> not do anything ? (I need to RTFM).
>
>
>
*Ok so it is ctrl return, my mistake (old macs never used to use the ctrl 
key as a **modifier!)*


*Got the results using Perl but as it is rusty, I need to work on getting 
a direc**tory  list and then executing the script on each 
file, can't remember how to process more than one file at a time or use 
wildcards.*


*Thanks for the tips anyway!*
 
---
Mark

 

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 

--- 
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 bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.


Re: Hoe to run multi file searches as a script or macro

2014-10-27 Thread mmb21003200

Using grep works but only one search at a time because of my limited 
knowledge of regexp !

How do I do a regexp search with multiple finds but excluding certain 
patterns so for example in Perl I can do

print if (/^.*\@thisweek(?!.*\@done).*/);
print if (/^.*\@nextweek(?!.*\@done).*/); etc

Not great as would rather do it in one pattern, but it does return what I 
want.

So Ideally I want to find all lines with '@due' OR '@next-week' OR '@next 
month' but NOT @done

Cant understand why a multi file search using text factory  in BBE won't 
allow the results to go into a new window.

Thanks.
---
Mark

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 

--- 
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 bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.


Re: Hoe to run multi file searches as a script or macro

2014-10-29 Thread mmb21003200
Chris,

The bbfind command was very useful and works well for me in a worksheet, many 
thanks.

Mark

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 

--- 
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 bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.