• 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: Issuing commands to shell
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Issuing commands to shell
      • From: Alex Zavatone <email@hidden>
References: 
 >Issuing commands to shell (From: Alex Zavatone <email@hidden>)

  • Prev by Date: Re: Issuing commands to shell
  • Next by Date: Re: Issuing commands to shell
  • Previous by thread: Re: Issuing commands to shell
  • Next by thread: Re: Issuing commands to shell
  • Index(es):
    • Date
    • Thread