[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: RFC: use readable $(cmd) syntax instead of unreadable `cmd`



Jari Aalto wrote:
>      "If your development environment cannot display ` differently than ' ,
>      you need to get a new one."

Note that even though I wrote the above, I'm not exactly opposed to $().
I've been using $() in most shell code I write for years. But this does
not mean that I feel it's worth my time to go back and change every
instance of backquotes in all the code I wrote before that, or all the
code from upstream in all my packages. Doing so is too high a level of
busy-work.

The fact that in a makefile or rules file you have to write $$() (or
$(shell ) though that's not exactly the same), also makes backquotes a
more appealing option in makefiles. Similarly, while perl does allow
writing qx{} instead of using backquotes, that's sufficiently uglier
that I still tend to use backquotes there.

The primary benefit of $() is not readability anyway, it's easier
nesting. Nested backquotes in shell are really ugly.

-- 
see shy jo

Attachment: signature.asc
Description: Digital signature


Reply to: