Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2002

    [bash scripting] last executed command return value?

    I have a bash script running an rysnc command, like so:

    PHP Code:
    rysnc -avz -e ssh ./ user@server 
    I would like to find out if the command was successful or not. I cant remember which variable it was stored in, or how to find it out.

    Lil help much appreciated!

  2. #2
    Join Date
    Jan 2003
    It's pretty difficult to find in the man page, but it's $?
    Game Servers are the next hot market!
    Slim margins, heavy support, fickle customers, and moronic suppliers!
    Start your own today!

  3. #3
    Join Date
    Jun 2004
    Bay Area -USA
    This sounds like a very useful thing. Thanks!
    <<< Please see Forum Guidelines for signature setup. >>>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts