Home
Sign Up
Sign In
Distributions
›
Ubuntu
›
Fedora
›
CentOS
中文资源站
›
网易开源镜像站
V2EX
›
Linux
shell脚本中`反引号是做什么用的?
qingfeng
·
Oct 12, 2013
· 6338 views
This topic created in 4777 days ago, the information mentioned may be changed or developed.
shell脚本中`符号是做什么用的,就是键盘上Tab键上面一个键?是不是执行一个命令组合的时候前后都得必须加这个符号,比如:
cmd=`echo -n "$1" | wc -c | sed 's/ //g'`
retval=`cut -b $cmd`
shell
Cmd
符号
3 replies
•
1970-01-01 08:00:00 +08:00
L0rAx
Oct 12, 2013
1
第一句解释为:将echo -n "$1" | wc -c | sed 's/ //g'得到的结果赋值给cmd
bluntblade
Oct 12, 2013
2
命令替换,将``中的命令的输出结果原地替换。
yesono
Oct 13, 2013
3
和 $(...) 一样
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Privacy
·
Solana
·
1846 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 25ms ·
UTC 15:47
·
PVG 23:47
·
LAX 07:47
·
JFK 10:47
♥ Do have faith in what you're doing.
❯