Hi, I have a command (copied below) which grabs the paths of the selected items in the Finder, and inserts them into a textmate doc.
I'd like to do some post-processing of the result (replace e.g. replace "/Users/.*/" with "~", and strip trailing return character.
How does one take the resulting string from a script, and process it, say, in php or bash. or should I just work on post-processing theList in applescript?
Thanks!
#!/usr/bin/env bash osascript -e 'tell application "Finder" set theFiles to selection set theList to "" repeat with f in theFiles set theList to theList & """ & POSIX path of (f as alias) & ""," end repeat return theList end tell'