Re: Return file list sorted by modification date instead of alphabetically
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."
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