I made a bash script called test.sh
that contains the following:
#!/#bin/bash
echo "Done!"
I enter bash test.sh | at 1549
:
myusername@machine:path$ bash test.sh | at 1549
warning: commands will be executed using /bin/sh
job 4 at Fri Sep 3 15:49:00 2021
myusername@machine:path$ date
Fri Sep 3 15:48:22 EDT 2021
myusername@machine:path$ date
Fri Sep 3 15:49:12 EDT 2021
Why does it appear that the script was not executed? Is it because my shell is bash as shown below?
myusername@machine:path$ echo $SHELL
/bin/bash
bash
as command for the script it would run OK, but if ran as stand-alone the system would likely go bananas trying to interpret the line. You say interpreter is/#bin/sh
which I can not see how it would normally exist.#!/bin/bash