Skip to content

Instantly share code, notes, and snippets.

@theonewolf
Created October 7, 2012 19:53
Show Gist options
  • Select an option

  • Save theonewolf/3849384 to your computer and use it in GitHub Desktop.

Select an option

Save theonewolf/3849384 to your computer and use it in GitHub Desktop.
print return value of program
#!/bin/bash
function test
{
return 10
}
test
/usr/bin/printf '%d\n' $?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment