Re: Issuing commands to shell
Re: Issuing commands to shell
- Subject: Re: Issuing commands to shell
- From: Axel Luttgens <email@hidden>
- Date: Fri, 09 Nov 2012 10:38:34 +0100
Le 9 nov. 2012 à 00:12, Alex Zavatone a écrit :
> I just found out that my Safari pause and resume script doesn't work since the shell commands I'm executing are erroring out.
>
> What works in the Terminal:
> kill -SIGSTOP 580
>
> Returns this when I try to issue a do shell script:
>
> do shell script "kill -SIGSTOP 580"
> --> error "sh: line 0: kill: SIGSTOP: invalid signal specification"number 1
>
> Any ideas on what I need to escape to make this work?
Hello Alex,
Looks like to be a posix compliance matter; "do shell script" launches sh (as emulated by bash) in posix mode.
So, either one disables the posix mode:
do shell script "set +o posix; kill -SIGSTOP 580"
or one invokes the kill builtin without prepending the signal name with SIG:
do shell script "kill -STOP 580"
Axel
_______________________________________________
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