Error The Command Exited With A Non-zero Status. Number 255
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this command exited with non zero status 1 site About Us Learn more about Stack Overflow the company Business Learn command exited with non zero status 2 more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x exited with non-zero status c++ Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Applescript the command exited with a non-zero status diskmaker returns “The command exited with a non-zero status” on do shell script up vote 2 down vote favorite I'm working with an Applescript that I'm trying to make, after it does a command to check back results of a command, but when I execute it, it prompts a message (in AppleScript Editor); Expected expression but found “error”.. How can I fallback and check if
Command Exited With Non Zero Status
the command is same as The command exited with a non-zero status. so I can do something else if it's the same as the error message? do shell script "echo \"stats\" | nc localhost 11211" password "~password~" with administrator privileges if error = "The command exited with a non-zero status." then display dialog "Returned zero" else if result = "The command exited with a non-zero status." then display dialog "Returned zero" else if result = "" then do shell script "memcached -d -l 127.0.0.1 -p 11211 -m 64" display dialog "Memcached Started" else do shell script "killall memcached" with administrator privileges display dialog "Memcached Stopped" end if EDIT: Updated version set error to do shell script "echo \"stats\" | nc localhost 11211" password "~password~" with administrator privileges if error = "The command exited with a non-zero status." then do shell script "memcached -d -l 127.0.0.1 -p 11211 -m 64" display dialog "Memcached Started" else do shell script "killall memcached" with administrator privileges display dialog "Memcached Stopped" end if applescript share|improve this question edited Jul 2 '11 at 19:15 asked Jul 2 '11 at 17:12 MacMac 8,88234108191 add a comment|
for Windows, Linux and OS X Author Message 31 Dec 2008 08:38:16 Subject: The command exited with
The Command Exited With A Non-zero Status. (1) Diskmaker
a non-zero status Anh_N New member Joined: 30 Dec 2008 05:25:05 Messages: exited with non-zero status java 4 Offline I downloaded the latest postgresql-8.3.5-2-osx.dmg from enterprisedb.com and installed. The first run "Start Server" with exited with non-zero status python /Applications/PostgreSQL 8.3/Start Server.app failed to start up the server and fired this error message: The command exited with a non-zero status I tried to start from terminal: $ sudo su http://stackoverflow.com/questions/6558435/applescript-returns-the-command-exited-with-a-non-zero-status-on-do-shell-scri postgres $ postmaster -D /Library/PostgreSQL/8.3/data Then it's ok! It seems to be the permission problem! Not sure! Same problem for Restart Server.app and Stop Server.app 5 Jan 2009 00:34:46 Subject: Re:The command exited with a non-zero status Sachin_S Senior member Joined: 1 Aug 2008 02:37:24 Messages: 486 Offline You get the Error ( "The command exited with a http://forums.enterprisedb.com/posts/list/1576.page non-zero status" ) if you try to start postgres when it is already running OR when you try to stop when it is not running. Does that help ?. -- Regards, Sachin Srivastava EnterpriseDB , the Enterprise Postgres company. 5 Jan 2009 03:31:46 Subject: Re:The command exited with a non-zero status Anh_N New member Joined: 30 Dec 2008 05:25:05 Messages: 4 Offline Thanks a lot, Sachin_S! When I start up the pc. It seems postgres is already running. So the Start Server.app won't work, but why does the Stop Server.app fail also? They work ONLY when I open Activity Monitor and kill of the postgres processes then run the Start Server.app again. And the Stop Server.app ONLY work when the server is started with Start Server.app! Anyway the error message should be "Server is already running" or "Server is not currently running" instead of "The command exited with a non-zero status" This message was edited 1 time. Last update was at 9 Jan 2009 12:53:25 9 Jan 2009 12:36:39 Subject: Re:The command e
shady Member Registered: 2009-06-25 Posts: 10 bundling up email messages into a PDF attachment What I would like to do:- every day at a certain time, look for all items which have http://macscripter.net/viewtopic.php?id=32483 been added to a particular mailbox that day (ie where date received is newer than yesterday)- combine all these messages together into a digest- print the digest into a PDF file- forward http://unix.stackexchange.com/questions/288304/echo-input-text-amount-limit said file as an attachmentIs this possible?Thanks Offline #22010-03-27 05:28:09 pm mark hunte Member From: Hello, London Calling Registered: 2006-03-20 Posts: 1030 Website Re: bundling up email messages into a PDF attachment exited with I assume you are using automator.When you save these file down, do you get odd characters in the text. Tap,tap,tap , hello , testing 1..2, 1...2,http://www.markosx.com/thecocoaquest/ Offline #32010-03-28 12:00:44 am mark hunte Member From: Hello, London Calling Registered: 2006-03-20 Posts: 1030 Website Re: bundling up email messages into a PDF attachment Hi,Here is my first draft,I have tested this script and I think it does command exited with what you want.The reason I asked about odd characters in the text, is no matter what method I tried, Automator, Applescript..I got lots of garbage from the bad html type emails.I had the bases of the pdf conversion and emailer pretty much already,I could have posted a script sooner but was not really happy with the garbage in the end result.So spent sometime trying to find a solution.This works. Now saying that, I am sure someone will do it better The script gathers the selected emails. (You will need to change the get selection to what ever method you want to use to gather the emails)It then gets each emails details and combines them in a similar format used by the Automator action and cleans any garbage characters out by writing out two helper files.Then writes out the final pdf file, and deletes the two help files.Formats the email and sends it. ( Actually I have set it here to SAVE in drafts, Change it to SEND)Thats it, I wrote this on the fly kinda thing, so it most likely can slimmed down;)Applescript: (* CHANGE EMAIL ADDRESSES *) property theAddressTo : "TheirEmailAddress@mac.com" property theAddressF
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Unix & Linux Questions Tags Users Badges Unanswered Ask Question _ Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Echo input text amount limit? up vote 2 down vote favorite I'm trying to do echo "foo foo foo ....[many many lines of foo here] foo" > "/Users/myname/destination.txt" through Applescript, but it returns an error when the characters in the lines of foo hit some amount (It looks like it's 255392 characters.). By "through Applescript," I mean I'm trying this with AppleScript's "do shell script", which stops process when the exit status is non-zero and returns this: "error "The command exited with a non-zero status." number 255 Here's my Applescript code: set mytext to "foo foo foo ....[many many lines of foo here] foo" do shell script ("echo " & quoted form of mytext & " > " & "/Users/myname/destination.txt") The actual big text data (20000+ lines, 285831 characters) I use for input has a lot of quotation marks and backslashes, and I don't want to mess up my files by put my text data directly into terminal and have it misinterpret some parts of my input text data as commands or file names, so I'm not checking this directly with bash yet. It might be more of an Applescript's problem, but I thought I might get response sooner here, so I'm posting this here. Is there a limit of characters of input text in echo, or something? How can I avoid this? Edit: I wrote this in a shell script and ran it on terminal and it worked but I'd like to do this through Applescript and I don't have no idea why doesn't this work in Applescript : #!/bin/bash echo "aaaaaaa[100000+ "a"s in here]aaaa" > "/Users/myname/destination.txt" bash echo error-handling share|improve this question edited Jun 8 at 3:57 asked Jun 8 at 3:12 stacko 1617 I suspect that's a limit on the length of a given shell command, not specific to echo. The fix is simple: Don't do it all in one command. And don't use echo. What are you actually t