check for file existence

  • use hash docker-compose instead of which docker-compose to not produce output

delete with progress

rm -Rfv overlay | pv -l > /dev/null

limit inodes on ext4 file system

mkfs.ext4 -N 272175 /dev/loop0

set variables with default


pipe and print program output at the same time

echo 1 | tee >(logger -i -t hello)

shell dimensions

tput cols
tput lines

validate env variables

: ${RGNE:?"must be present"}

read from command as file

cat <(echo ls)

variable variables

export FOO=BAR
export name=FOO
echo ${!name}    # prints BAR

no buffering

cat /something | stdbuf -oL -eL grep -o "status=.*"