I'm trying to copy a file from: ~/.ssh/ but everytime I run the script it keeps saying
pi@raspberrypi:/etc/greenwich $ ./copybash.sh
cat: ~/.ssh/testfilegen2.log: No such file or directory
copybash.sh
!/bin/bash
sourceFile="~/.ssh/testfilegen2.log"
targetFile="/etc/network/interfaces2"
sudo cat "$sourceFile" > "$targetFile"
sudo service networking restart
Any Suggestions?
Thank you