• 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: Return file list sorted by modification date instead of alphabetically
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Return file list sorted by modification date instead of alphabetically


  • Subject: Re: Return file list sorted by modification date instead of alphabetically
  • From: Christopher Stone <email@hidden>
  • Date: Wed, 12 Mar 2014 22:20:30 -0500

Hey Folks,

On Mar 12, 2014, at 18:54, Terrazas, Enrique <email@hidden> wrote:
By specifying the path (/bin/ls) you bypass any aliasing of commands that may be occurring.

It's not necessary to specify the full path to do this.  All you have to do is quote ls:

'ls'

For that matter shell customizations (aliases, etc) don't come into play in AppleScript calls to do shell script:

"For security and portability reasons, do shell script ignores the configuration files that an interactive shell would read, so you don’t get the customizations you would have in Terminal."

http://developer.apple.com/library/mac/#technotes/tn2002/tn2065.html

Anyone using do shell script should read through the above tech-note.

Shell scripting can be very powerful, so it may be useful to invest in a good unix or linux reference that includes a good bit of shell scripting information.

It is very difficult to glean a good working knowledge of the shell by reading tidbits from the Internet and by fiddling.  Enrique is quite right; it's a good idea to invest in a book.

I have "Beginning Shell Scripting" by Eric Foster-Johnson, John C. Welch, and Micah Anderson

It's a little old, but it's still a pretty good book for beginners.

--
Best Regards,
Chris

 _______________________________________________
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

References: 
 >Return file list sorted by modification date instead of alphabetically (From: Bert Groeneveld <email@hidden>)
 >Re: Return file list sorted by modification date instead of alphabetically (From: Luther Fuller <email@hidden>)
 >Re: Return file list sorted by modification date instead of alphabetically (From: Bert Groeneveld <email@hidden>)
 >Re: Return file list sorted by modification date instead of alphabetically (From: "Terrazas, Enrique" <email@hidden>)
 >Re: Return file list sorted by modification date instead of alphabetically (From: Bert Groeneveld <email@hidden>)
 >Re: Return file list sorted by modification date instead of alphabetically (From: "Terrazas, Enrique" <email@hidden>)

  • Prev by Date: Re: Return file list sorted by modification date instead of alphabetically
  • Next by Date: Copy range and paste values in Excel — grammar issues
  • Previous by thread: Re: Return file list sorted by modification date instead of alphabetically
  • Next by thread: Re: Return file list sorted by modification date instead of alphabetically
  • Index(es):
    • Date
    • Thread