I made a script to encapsulate the use of rsync. Problem is, the output of stdout is lost, which prevent me from testing it. I know how to redirect to a file, but how can I redirect to the standart output?
myscript.sh
if [ $# = 0 ]
then
echo "Not enought arg"
exit 1
else
rsync -avze ssh --partial --delete root@$1:/home/* /backup/$1
exit 0
fi
I presume I just have to add > after rsync, but to what?
rsyncis producing any output and your script is as you've shown and if you're not redirecting the output of your script, then you should see the output.