• 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
Re: AS or Unix tools for turning find result into a nice consistent tab separated text file?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AS or Unix tools for turning find result into a nice consistent tab separated text file?


  • Subject: Re: AS or Unix tools for turning find result into a nice consistent tab separated text file?
  • From: Gnarlodious <email@hidden>
  • Date: Sat, 10 Jun 2006 09:12:03 -0600

Richard Rönnbäck <email@hidden> wrote:
the find result may be up to 100 000 lines long
Definitely a job for sed.

/Images/somefile.jpg 2005 06 02 14:42 45678 1123456
This output sample is not compatible with any of these two input examples:

    4136284 1120 -rw-r--r--    1 richardr wheel      527927 May  1 17:53
/Users/richardr/Desktop/LOGOTYPE/rr_logo_100x100 endast symbol.psd
    1746034 1160 -rwx------    1 richardr richardr   593360 Mar 26  2001
/Users/richardr/Desktop/Städa/Indesign/Bakgrunder/åker.psd
So lacking essential details, I suggest some regex's like this

set someText to "1746034 1160 -rwx------    1 richardr richardr
593360 Mar 26  2001
/Users/richardr/Desktop/Städa/Indesign/Bakgrunder/åker.psd"

do shell script "echo " & someText & " | sed 's|^\\(.*\\) \\(.*\\) .*
 .* .*   .* \\(.*\\) \\(.*\\)  \\(.*\\)
/\\(.*\\)$|/\\6	\\5	\\3	\\4	\\2	\\1|' "


3) Adding actual year to files more recent than six months, and a mock-up
time "00:00" to files older than six months
That is more work than I care to do at the moment.

The rest of your post I don't understand.

-- Gnarlie
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: Problem with Reply, Forward and Outgoing Messages in Application "Mail" (From: Michelle Steiner <email@hidden>)
 >AS or Unix tools for turning find result into a nice consistent tab separated text file? (From: Richard Rönnbäck <email@hidden>)

  • Prev by Date: Re: AS or Unix tools for turning find result into a nice consistent tab separated text file?
  • Next by Date: Re: Deploy compiled AppleScript not work
  • Previous by thread: Re: AS or Unix tools for turning find result into a nice consistent tab separated text file?
  • Next by thread: Re: AS or Unix tools for turning find result into a nice consistent tab separated text file?
  • Index(es):
    • Date
    • Thread