To run it,
chmod +x program
program
#!/bin/sh
# Shell script which prints The Twelve Days of Programmers
# Written by George Ruban, 12-24-97
# http://www.GeoCities.com/SiliconValley/Vista/2013
# reproduce freely, with this notice
ordinal="first second third fourth fifth sixth seventh eighth ninth tenth \
eleventh twelfth"
n=1
for gift in \
"a shell script that prints this poem." \
"two core dumps," \
"three broken master makes," \
"four fatal errors," \
"five golden files..." \
"six spaghetti-code subroutines," \
"seven segmentation violations," \
"eight unreproducible bugs," \
"nine annoyed customers," \
"ten terrified sales-reps," \
"eleven exultant competitors," \
"twelve terminated programmers,"
do
poem="$gift N $poem"
num=`echo $ordinal | cut -d' ' -f $n`
echo "On the" $num "day of Christmas, my hacker gave to me N" \
$poem | tr N '\12'
if [ $n -eq 1 ] ; then poem="and $poem" ; fi
sleep $n
n=`expr $n + 1`
done
#!/bin/sh
# Written by George Ruban, 12-24-97
# http://www.GeoCities.com/SiliconValley/Vista/2013
# reproduce freely, with this notice
o="svefg frpbaq guveq sbhegu svsgu fvkgu friragu rvtugu avagu gragu \
ryriragu gjrysgu" ; n=1
for g in "n furyy fpevcg gung cevagf guvf cbrz." "gjb pber qhzcf," \
"guerr oebxra znfgre znxrf," "sbhe sngny reebef," "svir tbyqra svyrf..." \
"fvk fcnturggv-pbqr fhoebhgvarf," "frira frtzragngvba ivbyngvbaf," \
"rvtug haercebqhpvoyr ohtf," "avar naablrq phfgbzref," \
"gra greevsvrq fnyrf-ercf," "ryrira rkhygnag pbzcrgvgbef," \
"gjryir grezvangrq cebtenzzref..."
do
p="$g N $p"
m=`echo $o | cut -d' ' -f $n`
echo "Oa gur $m qnl bs Xznf, zl unpxre tnir gb zr N" \
$p | tr '[a-z]N' '[n-z][a-m]\12'
if [ $n -eq 1 ]; then p="naq $p"; fi
sleep $n
n=`expr $n + 1`
done
Return to main page.