Shell script problem with Enter key
Hi I have a sync/backup shell script that had been working for a while and all of a sudden it is acting weird.
Basically I am trying to sync /home to /home on an external drive but somehow the script creates a new /home (with some spaces, or maybe an "Enter" sign).
The following is my code:
Code:
#!/bin/sh
sudo rsync -rtpogv --progress --delete --exclude=/guest --exclude=/lost+found --exclude=/xxx/.gvfs --exclude=/xxx/.cache --exclude=/*/firefox/"Crash Reports" --exclude=/*/firefox/*/Cache --exclude=/*/firefox/*/minidumps -u -l -H /home /media/Shared/home(note: no space here, but "Pressed Enter" to go to next line!!!)
sudo rm -R /media/Shared/etc/
sudo cp -R /etc/ /media/Shared/etc/
It seems the terminal is interpreting the "Enter" here as a character something.
Can somebody help?
I use Ubuntu 10.04
ASRock ION3D 152D Intel Atom D525 (1.8GHz, dual-core) NVIDIA GT218-ION 1 x HDMI 2GB/320GB, Ubuntu Mate 18.04
Bookmarks