export SRVHOME=`readlink -f \`dirname $0\`/../`
I know it exports a directory variable . but what means by the symbol “\`” or “`” surround the command?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Whatever you put between two ` characters is a command run on a fork of your shell.
In this case, the command itself contains another pair of ` characters – hence, they must be escaped, which is done here by prepending a
\character.An other example:
Note:
set -xdisplays all steps of a command. Helpful for debugging.In bash you can run several encapsulated commands with
$(command)instead: