[Eug-lug] shell evilness
toman
toman at ellisdunes.org
Thu Jul 6 20:29:19 PDT 2006
>> On 7/6/06, Patrick R. Wade <prwade at oip.net> wrote:
>>
>>> 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...
>>
Um,
mkdir {Sun,Satur,Mon,Thurs,Tues,Wednes,Fri}day
Sometimes simpler is better, or at least shorter.
Though you can't really fault other languages for being longer,
the shell does have the home court advantage.
J.
Toman
More information about the EUGLUG
mailing list