Re: What have I done? / do shell script mystery
Re: What have I done? / do shell script mystery
- Subject: Re: What have I done? / do shell script mystery
- From: "Mark J. Reed" <email@hidden>
- Date: Sat, 22 Oct 2005 08:54:24 -0400
What happened is that you have a file named something.txt in whatever
your current working directory is when you run the do shell
script. The shell expands wildcards before the command line gets
run, so by the time find starts up and looks at its argument list, it
sees "something.txt" instead of "*.txt", and it only finds one file
with that specific name.
It works in Terminal because your current directory is not the same and
does not contain any .txt files; if there is no file matching a
wildcard, the shell leaves it alone.
The quotation marks prevent the shell from expanding the wildcard;
instead it passes it on verbatim to find, and it's up to find to
interpret it.
On 10/22/05, Richard Rönnbäck <email@hidden> wrote:
It works! :-)
Thanks Shane!
I'll by you a very large beer shortly :-)
> From: Shane Stanley <email@hidden>
> What happens if you put quotes around *.txt:
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden
This email sent to email@hidden
--
Mark J. Reed <
email@hidden>
_______________________________________________
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