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.
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