- She bang line, location of shell
which bash
- Store arguments from bash in array
args=("$@")
- Number of arguments
count=("$#")
- Date
NOW=$(date +"%m-%d-%Y")
- Print a random file
files=(./*); printf "%s\n" "${files[RANDOM % ${#files[@]}]}"
- Create empty dir
[ -d "./data" ] && mkdir data || rm -rf ./data/*
Moves selected files