I am trying to copy a file on reboot as raspberry pi deletes my .asoundrc file every time. I have a copy of the file saved and a shell script I wrote. The shell script works, but I cannot get it to run in crontab. According to
Code in script named copyASoundRC.sh
#!/bin/bash
cp '/home/sox/asound data/.asoundrc' '/home/sox'
attempted code in crontab
@reboot bash "/home/sox/asound\ data/copyASoundRC.sh"
Any help is greatly appreciated
ps this is a repost from the Raspbery Pi exchange, they said it did not belong there. Please don't get angry for that.
Edit 1 based on @Seamus answer
#!/bin/bash
cp /home/sox/asoundData/.asoundrc /home/sox
@reboot /home/sox/asoundData/copyASoundRC.sh >> /home/sox/mylogfile.txt 2>&1
There are no errors in mylogfile.txt, but it still does not work
"
or backslash-escaping, but not both. – Jim L. Mar 30 '23 at 19:35