It might sound odd, but I need to run the AT command and schedule a command but I don't want to make a file and send it to AT with the -f option. Is it somehow possible to write the whole thing in one single line. Suppose I want to run the "gnome-terminal" at the time 13:10.

Thanks

有帮助吗?

解决方案

at reads from standard input by default, i.e. if -f is not used. You can pass multiple lines in several ways, e.g. using here documents:

at << EOF
first line
second line
EOF

Or within a single line (specific to bash):

at <<< $'first line\nsecond line'
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top