[Nottingham] HOT Dating one-liner contest

Jason Cozens jason.cozens at computer.org
Tue Jan 15 20:17:21 GMT 2008


> Reread what I typed... There very distinctly is the description
> "academic" in there. Michael gets the beer!
>
> Good try on the broader interpretation ;-)
>
>
> Meanwhile, this is turning into a good showcase for favoured solutions :-)
>
> Keep em' rolling for comparison.
>
I mentioned this to Calvin at work and he said "can't you use cal?"
So here's a version with no maths.

A one line bash command (split for readability ;)):

 for m in $(seq 1 12);do cal $m 2008| \
> grep "^ \{0,10\}[0-9]\{1,2\}"| \
> sed -n -e"1s/^.\{10\}\(.\).*$/\1/p;3s/^.\{12\}\(..\).*$/  \1/p";done

Cheers,
Jason.



More information about the Nottingham mailing list