Skip to content

Instantly share code, notes, and snippets.

@sokil
Last active November 12, 2019 20:51
Show Gist options
  • Save sokil/9923396 to your computer and use it in GitHub Desktop.
Save sokil/9923396 to your computer and use it in GitHub Desktop.
Bash / Sh / Console / Cli arguments
#!/bin/sh
echo 'Number of arguments: '$#
echo 'All arguments: '$*
echo 'All arguments: '$@
echo 'Shell parameters: '$-
echo 'Exit code of last app: '$?
echo 'Shell PID: '$$
ls -lah > /dev/null &
echo 'Last daemonized(&) PID: '$!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment