Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 3
    Why the downvote? That command will work in csh/tcsh and in Bourne-like shells provided $IFS doesn't contain digits (cat is redundant though). Commented Jan 27, 2015 at 9:38
  • Not from me :-) Commented Jan 27, 2015 at 9:39
  • 1
    It's better to use $(...) instead of backticks. Otherwise, it works. Commented Jan 27, 2015 at 9:54
  • Why is it better (appart from the need to escape the quotes for this forum)? Commented Jan 27, 2015 at 10:09
  • I'll answer my question myself. It isn't better, it only makes a difference which is that the quotes retain the meaning of the backslash while $() does not treat it specially. tldp.org/LDP/Bash-Beginners-Guide/html/sect_03_04.html Commented Jan 27, 2015 at 10:26