开发者

What does this line means in a shell script?

What does this line means in a shell script?

THIS_SCRIPT=$(readlink -f $0)开发者_开发知识库


It assigns the path of the script to variable THIS_SCRIPT. I checked the readlink manpage, the -f option follows the symlinks in path (if they exist)


$(...) means run the command within and return the output as a string. =, as you probably already know, assigns a string to a variable.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜