Greenrookie

Q: Applescript do shell grep

Hello,

 

I don't know much about shell grep and need some help. I have a filename variable that I want to grep and return the variable back to AS.

 

set filename to "Filename I need [Remove this bit].indd"

 

I would like to remove the the brackets including the contents, and the 1 white space in front of the first bracket.

 

Something like this pattern in Javascript.

 

\s\[.+\]

 

Could someone also recommend me a resource for beginners on shell grep.

 

Many thanks.

 

gr

OS X Yosemite (10.10.5)

Posted on May 25, 2016 6:44 AM

Close

Q: Applescript do shell grep

  • All replies
  • Helpful answers

Previous Page 2 Previous Page 2