• 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
do shell script and full path to unix command
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

do shell script and full path to unix command


  • Subject: do shell script and full path to unix command
  • From: Hagimeno <email@hidden>
  • Date: Thu, 17 Dec 2009 11:56:44 +0000 (GMT)

Hi,

as described in the tech note:
http://developer.apple.com/mac/library/technotes/tn2002/tn2065.html

is suggested to use the full path to unix command

Second, when you use just a command name instead of a complete path, the shell uses a list of directories (known as your PATH) to try and find the complete path to the command. For security and portability reasons, do shell script ignores the configuration files that an interactive shell would read, so you don’t get the customizations you would have in Terminal. Use the full path to the command, for example, /sbin/ifconfig instead of just ifconfig. To find the full path in Terminal, say which command-name, for example, which ifconfig; to see the list of places do shell script will search, say do shell script "echo $PATH".

Usually calling do shell script with full path, all works good with many commands.
But using the cd command with full path:
/usr/bin/cd /Users/adminosx/Music/iTunes

don't switch dir.

Is possible to know why?

Alex and Steve




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: do shell script and full path to unix command
      • From: "Mark J. Reed" <email@hidden>
  • Prev by Date: Re: difficulties with read file applescript
  • Next by Date: Re: do shell script and full path to unix command
  • Previous by thread: Re: difficulties with read file applescript
  • Next by thread: Re: do shell script and full path to unix command
  • Index(es):
    • Date
    • Thread