Re: Re. Help with simple grep - Thanks
Re: Re. Help with simple grep - Thanks
- Subject: Re: Re. Help with simple grep - Thanks
- From: Skeeve <email@hidden>
- Date: Sat, 30 Aug 2008 23:22:18 +0200
Skeeve schrieb:
Joe schrieb:
Could I make a one-liner from the two "do shell script" statements?
Sort of like this:
set width to paragraphs of (do shell script "mdls -name
kMDItemPixelHeight -name kMDItemPixelWidth " & ( quoted form of x ) &
" | perl -ne 'print qq/$1\n/ if /(\d+)/'")
should do it.
Sorry! This won't work if the filename contains digits. This is better:
set width to paragraphs of (do shell script "mdls -name
kMDItemPixelHeight -name kMDItemPixelWidth " & ( quoted form of x ) & "
| perl -ne 'print qq/$1\n/ if $.>1 and /(\d+)/'")
But this assumes that the file exists.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden