For some reason, running docker commands from bash scripts doesn't work if you add regular variables, example:
c=$(date +"%x")
targets="www.example.com"
docker build -t amass https://github.com/OWASP/Amass.git
docker run amass --passive -d $targets > $c.txt
The error is as follows:
./main.sh: 13: ./main.sh: cannot create 12/29/2018.txt: Directory nonexistent
Running same commands from a terminal operate directly. How can I fix this?
shis notbash.main.sh? Do you have a directoryamass_out_12/29in your docker?mkdir amass_out_12/29?