do shell script and full path to unix command
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