An entire shell command can be executed like a function, returning its output in place. This is done by surrounding the command with parentheses and prefixing a dollar sign:
u$(perl -e 'print "na";')me
Why do we type u + the command then followed by me? Why don't we just do this?
$(perl -e 'print "uname";')
What is the differences and the goal of the first method?
The author's just being cute. There's no practical reason to write:
u$(perl -e 'print "na";')me
versus:
$(perl -e 'print "uname";')
They do the same thing. Really, there's no need for Perl at all when it comes down to it. In a real script you'd just write:
uname
The author want to hide the word 'uname' from a grep search. Your intentions are not good...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With