I was looking inside
/etc/skel/.bashrc and found this line:
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
I understand what the test
-x does, but everything onward with
eval is not-understandable.
Further more, when I run this line in other Linux distros it will cause an error:
# eval "$(SHELL=/bin/bash lesspipe)" bash: syntax error near unexpected token `newline'
This is on Ubuntu 14.04 (bash 4.3.11(1)), and the other bash version I tested is 4.3.39(1).
Can you explain what this line is doing, and why am I getting the above error?