for i in $(shuf -n 2 /usr/share/dict/words); do printf "%s_" $i;done
Robert_Aspidoganoidei_
lifeless_disloyally_
kk="four";for ((i=0;i<2;i++)); do while [ ${#kk} -ne 5 ];do kk=$(shuf -n 1 /usr/share/dict/words);done;printf "%s_" $kk;kk="four";done ; echo
jacal_gravy_
vapid_hilus_
kk="four";while [ ${#kk} -ne 5 ];do kk=$(shuf -n 1 /usr/share/dict/words);done;echo $kk
henna
roost
snake
- create 100 line log files, rotate filenames with counter and timestamp
cat ~/.bash_history | awk 'NR % 100 == 1 {close(f); f=sprintf("logfile_%04d_%s.txt.gz", ++i,"'"$(date +%Y%m%d_%H%M%S)"'"); cmd="gzip > " f} {print | cmd}'
$ ls -alrth
logfile_0002_20251111_220929.txt.gz
logfile_0003_20251111_220929.txt.gz
logfile_0004_20251111_220929.txt.gz
logfile_0005_20251111_220929.txt.gz
cat ~/.bash_history | awk 'NR % 100 == 1 {close(f); f=sprintf("logfile_%04d.txt.gz", ++i); cmd="gzip > " f} {print | cmd}'