Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: 99 bottles of beer



This uses a couple of zsh features, and is fairly convoluted, which may
or may not be a good thing.

Incidentally, I noticed that if one has a word e.g "echo"
on the command line, and attempts to insert [[]<magic-space> before it,
then the shell hangs, at least with unpatched hzoli 10.3.  Which may
have been fixed, but I mention it just in case.

Anthony

3>&1 for z in {{100..1},"no more"}" bottles"
 y=${w::="${z%s${z##<1>*}} of beer on the wall"}${y:+$(
  >&3 echo "$y, ${y% o*}.\nTake one down, pass it around, $w.")}



Messages sorted by: Reverse Date, Date, Thread, Author