Print a hex array with #Bash
seq 0 255 | awk '{printf "%02X ", $1}' | xargs -n16
Shuffle and rename the files in a directory of images:
$ echo '#!/bin/bash' > files; chmod 744 files; ls -1 | shuf | nl -i1 -s' ' -nrz -w5 | awk '{print "mv " $2 " " $1 ".jpg"}' >> files ; ./files
Calculate #Easter for a range of years
$ seq 2026 2046 | xargs -i ncal -e {}
04/05/2026
03/28/2027
04/16/2028
04/01/2029
04/21/2030
04/13/2031
03/28/2032
04/17/2033
04/09/2034
03/25/2035
04/13/2036
04/05/2037
04/25/2038
04/10/2039
04/01/2040
04/21/2041
04/06/2042
03/29/2043
04/17/2044
04/09/2045
03/25/2046
Perl one-liner to highlight consecutive duplicated words:
perl -pe 's/\b(\w+)\s+\1\b/\e[31m$&\e[0m/gi' gettysburg.txt
Remove empty directories under the working directory:
find . -empty -exec rm -rf {} \;
Sort the Holy Bible by verse length with Perl
perl -e 'print sort {length $b length $a} ' kjv.txt
NEH.10:16 – Adonijah, Bigvai, Adin,
NEH.10:18 – Hodijah, Hashum, Bezai,
NEH.10:27 – Malluch, Harim, Baanah.
NEH.12:5 – Miamin, Maadiah, Bilgah,
JOH.6:48 – I am that bread of life.
1CH.1:24 – Shem, Arphaxad, Shelah,
NEH.10:13 – Hodijah, Bani, Beninu.
NEH.10:17 – Ater, Hizkijah, Azzur,
NEH.11:33 – Hazor, Ramah, Gittaim,
NEH.12:4 – Iddo, Ginnetho, Abijah,
JOB.3:2 – And Job spake, and said,
EXO.20:15 – Thou shalt not steal.
1TH.5:19 – Quench not the Spirit.
1TH.5:25 – Brethren, pray for us.
EXO.20:13 – Thou shalt not kill.
NEH.10:15 – Bunni, Azgad, Bebai,
LUK.17:32 – Remember Lot’s wife.
1TH.5:17 – Pray without ceasing.
DEU.5:17 – Thou shalt not kill.
1CH.1:26 – Serug, Nahor, Terah,
1CH.1:1 – Adam, Sheth, Enosh,
1CH.1:25 – Eber, Peleg, Reu,
1TH.5:16 – Rejoice evermore.
JOH.11:35 – Jesus wept.




