#!/bin/bash

# Built-in variables are useful variables with default values maintained by
# the shell.
# Extensive list! See shell manual for a detailed list.
# But use with caution as not all are available in all shells.

# History control
echo $HISTSIZE
echo $HISTFILE
echo $HISTCMD
echo $HISTCONTROL
echo $HISTIGNORE

# Prompting
echo $PS1
echo $PS2
echo $PS3
echo $PS4

# Command search (related command: 'hash')
echo $PATH
echo $CDPATH

# Misc variables:
echo $USER
echo $UID
echo $GROUPS
echo $$        # PID
echo $?        # Exit code of the most recently finished foreground command
echo $!        # PID of the last run background process
echo $_        # Last argument of the last command that was executed
echo $PPID
echo $HOME
echo $PWD
echo $OLDPWD
echo $BASH
echo $BASH_VERSION
echo $BASH_VERSINFO
echo $RANDOM
echo $OSTYPE
echo $TERM
echo $HOSTNAME
echo $TMPDIR
