When I run this rsync command from terminal it executes as expected (syncs new files):

Code:
rsync -avz -e ssh user[a_t]dev[d_o_t]server[d_o_t]com:/home/www/project/ /home/user/public_html/project/
But when I save the same command in a file "sync.sh" and execute it, rsync just lists all files in dev[d_o_t]server[d_o_t]com:/home/www/project/ , doesn't sync and shows this error (?) at the end:

Code:
/home/user/bin/sync.sh: line 3: /home/user/public_html/project/: is a directory
What am I doing wrong? My sync.sh looks like this:

Code:
#!/bin/sh
rsync -avz -e ssh user[a_t]dev[d_o_t]server[d_o_t]com:/home/www/project/ /home/user/public_html/project/
Edit: forum thinks I'm posting links :/