• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Rép: Enhance text parsing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Prev by Date: Enhance text parsing
  • Next by Date: RE: Find duplicate numbers and replace
  • Previous by thread: Enhance text parsing
  • Next by thread: Sal Soghoian Applescxript 1-2-3 delayed
  • Index(es):
    • Date
    • Thread