Re: Need an AppleScript way to do this shell script
Re: Need an AppleScript way to do this shell script
- Subject: Re: Need an AppleScript way to do this shell script
- From: Axel Luttgens <email@hidden>
- Date: Thu, 15 Jul 2004 09:57:52 +0200
Joe Klemmer wrote:
Man, this list is a little to high volume for me to keep up with so
could anyone answering this CC both the list and me directly?
I have a shell script that will take the full posix path of a file or
directory from stdin and print out only the very last part. i.e. If
given this -
$ namesrc.sh /usr/local/test/whatever/foo
it will print out -
foo
regardless of whether "foo" is a directory (folder) or a file.
Ken already provided you with a pure AppleScript way to do this.
But, looking at your shell script, I'm wondering whether you couldn't
benefit from the shell basename(1) command.
Could prove useful in the case you had more things to do in the shell
before returning to AppleScript.
HTH,
Axel
_______________________________________________
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.