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"When I executed this script,
atqcommand only showed one job, the first one. What’s the matter? And how should I submit the two jobs via this script correctly?
The
<<!is a here document, as Nya explained.You should write:
Without the lines starting
!, your here document was the rest of the shell script, which is why there was only one command in theatq. (But, the command would have scheduled the second job when it ran!)