1
Hello I have written a script and I want to schedule it to run at a certain time with the at command. I also want to use an argument in order to pass the time I want in the script so it can be executed at a specific time. The script's name is displaydir and it has the following arguments:
./displaydir dir1 09:00 AM
The script:
#!/bin/bash
at $2 $3
ll $1
cp ./$1/ ./dir2
exit 0
Thank you for answering! Is there anyway to make the command line look like this: ./displaydir dir1 09:00 AM Because the hour and the directory have to be arguments – user25 – 2019-12-27T15:19:17.117