• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Need an AppleScript way to do this shell script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: Need an AppleScript way to do this shell script
      • From: Joe Klemmer <email@hidden>
References: 
 >Need an AppleScript way to do this shell script (From: Joe Klemmer <email@hidden>)

  • Prev by Date: Re: Strange behaviour of file from list after renaming...
  • Next by Date: Re: Need an AppleScript way to do this shell script
  • Previous by thread: Re: Need an AppleScript way to do this shell script
  • Next by thread: Re: Need an AppleScript way to do this shell script
  • Index(es):
    • Date
    • Thread