Re: Finding Filenames that contain a certain string
Re: Finding Filenames that contain a certain string
- Subject: Re: Finding Filenames that contain a certain string
- From: Bill Briggs <email@hidden>
- Date: Fri, 20 Jul 2007 22:17:14 -0300
At 8:20 PM -0400 7/20/07, J. Stewart wrote:
>On 7/20/07 at 4:12 PM, Michelle Steiner <email@hidden> spake thusly:
>
>>>The "do shell script" command, in contrast, does come standard with
>>>the system. It's not pure AS (it's in a scripting addition), but it
>>>requires no additional setup work on the part of the AS programmer to
>>>gain access to it. Now, the shell, as it happens, does regular
>>>expression matching. So using it seemed to be an obvious solution to
>>>the problem.
>>
>>Thing is that the "pure applescript" solution is understandable even by beginners, whereas the regex solution is pure gibberish to anyone who doesn't already know regex.
>
>
>And if you are never told about it or exposed to it I suppose you'll never need it. Sure is handy though.
I think one of the unstated issues here is that those opposed to shell scripting believe that you need to learn such a huge amount if you're going to use it. But you don't have to. UNIX is a cognitive black hole. After a decade of using it you still don't know it all. Not after 20 years. But you can use what you need when you need it, and even if it's not the "best" way to do it in the shell, if it works and works fast it's fine. You just need enough to get started, and you build as you go. And regular expressions are one of the things a person should learn early on.
I'm totally comfortable in the shell but even after many years I'm sure I do lots of things sub-optimally. I surely don't know but a tiny fraction of what can be done with the 1133 shell commands at my disposal. But it's still hugely useful to me. And I turn to the shell as much as to AppleScript. Particularly when speed is of the essence.
Since AppleScript offers the do shell script command, I think it's fine to present shell solutions here. Ruby might be a stretch, but the shell, yeah.
- web
_______________________________________________
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