[H-GEN] Useful not so obvious tips

Russell Stuart russell-humbug at stuart.id.au
Thu Oct 28 00:06:46 EDT 2004


On Thu, 2004-10-28 at 13:28, Greg Black wrote:
> I'm not going to pretend that that's pretty, or in any way
> preferable to the $() variation; but it's best not to get the
> details wrong.

OK, Ok, I admit to being wrong on all counts.  It has been
so long since I nested `s that I had forgotten it could be
done.  Now that it has point out I remember doing it myself
many years ago.  I now also remember the pain of debugging
nested backticks, and forming the rule "never nest if at
all possible".  Somehow that got translated over the years
to it doesn't work.

I also remember being overjoyed when $(cmd) was introduced.
It wasn't in the V7 shell, so I assumed it wouldn't be present
in the unbloated versions of the sh, such as ash.  Well, I
checked, and was surprised to find it does work in ash.  Not
only does it work in ash, it also works in busybox and sash.

In some ways the old days were really better:

  v7-unix$  man sh | wc -w      =   3087
  rh8$      man ash | wc -w     =   8048
  rh8$      man bash | wc -w    =  33928
  rh8$      man zshall | wc -w  = 113824
  
I like bash, but it ain't an order of magnitude better than
V7 sh.  I wonder what gains there are is worth the order of
magnitude increase in learning time?






More information about the General mailing list