Web Analytics Made Easy -
StatCounter return value of a system call? - CodingForum


No announcement yet.

return value of a system call?

  • Filter
  • Time
  • Show
Clear All
new posts

  • return value of a system call?

    Is it possible to save the return value of system call to a variable.

    I'm using system to call another script, written by someone else if python, that returns a variable that I need.

    I know how to sent the STDOUT to null but I want to retain it for use inside my script. Is this possible? Thanks

  • #2
    Well just wanted to respond that I found that answer to my question

    You can use backquotes to Invoke System Commands

    for example: $myname = `whoami`;

    be aware the you will almost always have to chop that variable after doing this because of the newlines appended to the output of normal system calls.