Skip to content

Instantly share code, notes, and snippets.

@hisener hisener/
Created Feb 6, 2018

What would you like to do?
#!/usr/bin/env bash
echo "----- Positional Parameters -----"
echo $0
echo $1
echo $2
echo $#
echo "----- All the positional parameters -----"
echo $@
echo $*
echo "$@"
echo "$*"
echo "----- Iterate over the arguments -----"
for arg in "$@"
echo $arg
echo "----- More $ -----"
echo "The exit status of last command (it was echo): $?"
echo "background" >/dev/null & # >/dev/null to discard its output
echo "PID of the background command: $!"
echo "The current PID: $$"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.