Re: Do Shell script with unix sub command and CocoaDialog
Re: Do Shell script with unix sub command and CocoaDialog
- Subject: Re: Do Shell script with unix sub command and CocoaDialog
- From: Doug McNutt <email@hidden>
- Date: Thu, 6 Mar 2008 16:40:48 -0700
At 17:22 -0600 3/6/08, Luther Fuller wrote:
>On Mar 6, 2008, at 3:38 PM, Christopher Nebel wrote:
>> Q: My command works fine in Terminal, but when I try to use it in do shell script, I get an error about "command not found." What's going on?
>> A: There are two possibilities. First, do shell script always uses / bin/sh to interpret your command, not your default shell, which Terminal uses. (To find out what your default shell is, say echo $SHELL in Terminal.) While some commands are the same between shells, others are not, and you may have used one of them. If you write your do shell script scripts in Terminal first, always use sh. You can start sh by typing /bin/sh; type exit to get back to your normal shell.
>I only use Terminal to check-out commands that I'm going to use in 'do shell script', so sh is my "normal" shell. Is there any way to change Terminal's default shell to sh?
"NetInfo Manager" under users, yourusername you can change your default shell. Good luck learning how to handle the fake directory structure that Netinfo displays. Every time I go there it's like being re-born into a whole new world.
In real UNIX your default shell is specified in the /ets/passwd file. It might be possible to change it there but some text in that file says it's used for single user mode only.
--
--> From the U S of A, the only socialist country that refuses to admit it. <--
_______________________________________________
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