这个bash重定向运算符是什么?<< ;! [英] what's this bash redirection operator? "<<!"
本文介绍了这个bash重定向运算符是什么?<< ;!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我看到了以下bash代码:在19:00<< ;!回显作业1"
.我有两个问题:
I saw the following bash code:at 19:00 <<! echo "job 1"
. I have two problems:
- 这是什么重定向操作符:
<<!
? -
我编写了以下脚本代码:
- What's this redirection operator:
<<!
? I wrote the following script code:
at 19:00 <<!
echo "job 1"
at 20:00 <<!
echo "job 2"
当我执行此脚本时, atq
命令仅显示一个作业,第一个作业.怎么了?我应该如何通过此脚本正确提交两个作业?
When I executed this script, atq
command only showed one job, the first one. What's the matter? And how should I submit the two jobs via this script correctly?
推荐答案
<<!
是您应该写:
at 19:00 <<!
echo "job 1"
!
at 20:00 <<!
echo "job 2"
!
没有以!
开始的行,您的here文档是shell脚本的其余部分,这就是为什么 atq
中只有一个命令的原因.(但是,该命令在运行时会安排第二个作业!)
Without the lines starting !
, your here document was the rest of the shell script, which is why there was only one command in the atq
. (But, the command would have scheduled the second job when it ran!)
这篇关于这个bash重定向运算符是什么?<< ;!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文