#!/bin/bash # check number of arguments, output a message to STDERR if [[ "$#" -eq "0" ]]; then 2>&1 echo "Usage: $0 FILE" exit 1 fi # check if an argument equals a string if [[ "$1" = "dev" ]]; then # ... fi # one line if... if [[ "$1" = "dev" ]]; then echo "If"; else echo "Else"; fi # arrays and looping over them repos=(example1 example2) for repo in "${repos[@]}"; do echo $repo done