# Rsync --progress from within a shell script??



## bluetick (Dec 12, 2012)

I have a shell script calling for rsync with --progress option. When it runs the file transfer completes but the output of the progress is not shown. 

Is there a way to direct the output to the ssh session from within the shell script??

Thanks


----------



## bluetick (Dec 12, 2012)

```
if [ -z $TERM ]
then
# if not run via terminal, log everything into a log file
main_function 2>&1 >> /var/log/script.log
else
# run via terminal, only output to screen
main_function
fi
```

asked and answered.


----------

