• 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: "koenig.yvan" <email@hidden>
  • Date: Fri, 09 Nov 2012 09:42:30 +0100

Le 09/11/2012 à 00:12, Alex Zavatone <email@hidden> 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?

TIA


According to the man, it seems that the string "SIGSTOP 580" is a signal_name parameter .
So it must be quoted because it embed a space.

try :

do shell script "kill -'SIGSTOP 580'"

or the more general scheme:

"SIGSTOP 580"
do shell script "kill -" & quoted form of result


Yvan KOENIG (VALLAURIS, France) vendredi 9 novembre 2012 09:42:24



 _______________________________________________
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: Issuing commands to shell
  • Next by Date: Re: Issuing commands to shell
  • Previous by thread: Issuing commands to shell
  • Next by thread: Re: Issuing commands to shell
  • Index(es):
    • Date
    • Thread