1

When I run

echo "hello" | at now + 7 minutes

I get the following output -

job 2 at 2016-12-11 05:06

However when I use

bash txt | at now + 7 minutes

It starts executing immediately.

Rui F Ribeiro
  • 56,709
  • 26
  • 150
  • 232

2 Answers2

1

The bash command is invoking the script now and doesn't have anything to pipe to the at command.

cat txt | at now + 7 minutes

will pass the lines of the bash script to at

1

you can use this too :

at -f txt now + 7 minutes