Re: More newbie queries: paths
Re: More newbie queries: paths
- Subject: Re: More newbie queries: paths
- From: John W Baxter <email@hidden>
- Date: Fri, 3 May 2002 20:35:19 -0700
At 15:51 -0700 5/3/2002, Chris Page wrote:
>
If you want to handle "~", then you're responsible for implementing
>
this behavior, just like any other shell program. Otherwise, just
>
tell your users that you are not a shell and they need to
>
expand "~" -- or any other special symbols, such as "$FOO"
>
environment variables -- before handing it to your script.
Not to mention some of the more esoteric things the shells can do (and this
is just a simple one):
bash2.05 john@localhost ~ % cd /tmp
bash2.05 john@localhost /tmp % touch beds
bash2.05 john@localhost /tmp % touch bolts
bash2.05 john@localhost /tmp % ls -l b{ed,olt,ar}s
ls: bars: No such file or directory
-rw-r--r-- 1 john wheel 0 May 3 20:25 beds
-rw-r--r-- 1 john wheel 0 May 3 20:25 bolts
And it gets worse...
bash2.05 john@localhost /tmp % echo b{ar{d,n,k},ed}s
bards barns barks beds
[Before one gets ambitious and writes the shell's substitution powers in
AppleScript, one might consider whether calling the shell via do shell
script and letting the shell do the work wouldn't be a better use of time.]
--John (who, as can be seen in the prompts, is only part way through his
switch to the bash shell)
--
John Baxter email@hidden Port Ludlow, WA, USA
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.