Rép: Enhance text parsing
Rép: Enhance text parsing
- Subject: Rép: Enhance text parsing
- From: KOENIG Yvan <email@hidden>
- Date: Thu, 15 May 2008 13:55:47 +0200
Bingo
"Jacques" already sent a soluce on MacScripter:
--[SCRIPT]
set someFolder to quoted form of POSIX path of (path to applications
folder)
do shell script "/usr/bin/mdfind -0 -onlyin " & someFolder & "
'kMDItemContentTypeTree == \"com.apple.application*\"' " & ¬
"| /usr/bin/xargs -0 /usr/bin/mdls -name kMDItemDisplayName -name
kMDItemVersion | /usr/bin/grep ^kMDItem " & ¬
"| /usr/bin/awk -F ' \\= \\\"' '{i = i + 1
if (i % 2 == 0) {
if (!match($0, /kMDItemVersion/) ) {print \" Version null\\n
\"$NF; i = i + 1 } else print \" Version \" $NF}
else print $NF}' " & ¬
"| /usr/bin/sed 's/\"$//;s/^.*(null)/ Version null/' | /usr/bin/
paste -d ' ' - - | /usr/bin/sort -f"
--[/SCRIPT]
Yvan KOENIG (from FRANCE jeudi 15 mai 2008 13:01:58)
_______________________________________________
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