首页 > 系统服务 > 详细

shell operator EOF shell 操作符

时间:2021-04-08 10:29:32      阅读:16      评论:0      收藏:0      [点我收藏+]

技术分享图片

 

总结:

这些被叫做shell操作符 shell operator

 

主要分为 control operators和redirection operators

技术分享图片

 

 

 

 

技术分享图片

 

 

 

技术分享图片

 

 <<: 这个被称作here document, 通常用来打印多行string

 

command会接收任何东西直到它找到下一个WORD,也就是上面的Text,

通常WORD一般用EOF,还可以是数字, 如果WORD被引号了,里面的内容不会有变量展,,如果没有被引号,那么变量会被站看

 

 

如果你想把command << WORD ... WORD 的结果继续向后导入,你必须把pipe放在<< WORD的同一行,你不能放在 第二个WORD或者别的行上

 

技术分享图片

 

<<<被成为 here string,类似于here documents,但被放在single line上使用,这个只存在于Unix port or rc(它起源的地方),zsh 一些ksh yash和bash上

无论什么东西给WORD都会被站看,并且值会传给command,这个一般用将变量传给一个command

技术分享图片

 

 

 

 

 

 

 

 

 

 

原文:

https://unix.stackexchange.com/questions/159513/what-are-the-shells-control-and-redirection-operators

 

shell operator EOF shell 操作符

原文:https://www.cnblogs.com/eret9616/p/14630435.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!