• 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: Luca Nalin <email@hidden>
  • Date: Thu, 15 Jul 2004 10:00:50 +0200

Il Wed, 14 Jul 2004 21:00:43 -0400, Joe Klemmer scrisse:
> 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 -

I you want the last part of a path, you can use the command (do shell
script...) "basename /path/to/the/file" (result = file). Instead, if
you want to get the directory that contain the last file in the path,
use the command "dirname /path/to/the/file" (result = /path/to/the).

Ciao
--
Luca Nalin
_______________________________________________
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.


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

  • Prev by Date: Re: Need an AppleScript way to do this shell script
  • Next by Date: Re: Record Access OSA by Ed email@hidden
  • 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