문제

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