bash
This demonstrates creating and managing aliases in Bash, including bypassing an alias to use the original command and listing all defined aliases.
alias ping='ping -c 5' # Escape the alias and use command with this name instead \ping 192.168.1.1 # Print all aliases alias -p
bash internalother builtin featuresshell configuration and customizationaliases
bash
This demonstrates various operations on a Bash associative array (dictionary), including accessing, retrieving, and manipulating key-value pairs.
declare -A sounds sounds["dog"]="woof" echo "${sounds[dog]}" # Dog's sound echo "${sounds[@]}" # All values echo "${!sounds[@]}" # All keys echo "${#sounds[@]}" # Number of elements unset sounds[dog] # Delete dog
bash internaldata manipulationsarray manipulationsassociative array (dictionary)