[Eug-lug] shell evilness

Patrick R. Wade prwade at oip.net
Thu Jul 6 11:00:40 PDT 2006


larry price wrote:
> mkdir $(for d in 1 2 3 4 5 6; do eval "date -v+${d}d +%A";done)
> 
> challenge to the perl monks; do the same thing in fewer characters...

prwade at lusitania:~$ uname -a
Linux lusitania 2.6.15-23-server #1 SMP Tue May 23 15:10:35 UTC 2006
i686 GNU/Linux
prwade at lusitania:~$ ( export d=1 ; date -v+${d}d +%A )
date: invalid option -- v
Try `date --help' for more information.
prwade at lusitania:~$


-- 
On two occasions I have been asked [by members of Parliament!], 'Pray,
Mr. Babbage, if you put into the machine wrong figures, will the right
answers come out?' I am not able rightly to apprehend the kind of
confusion of ideas that could provoke such a question.
	-- Charles Babbage


More information about the EUGLUG mailing list