Reputation: 733
I have the following functions in my .bashrc file:
# functions
# rsync transfer for DAMS uploads
function rsyncDAMS () {
rsync -avvPhi --no-p
}
export -f rsyncDAMS
# general rsync transfer
function rsyncT () {
rsync -avvPhi
}
export -f rsyncT
# general rsync transfer with deletion of source files
function rsyncD () {
rsync -avvPhi --remove-source-files
}
export -f rsyncD
but either of the three I run just brings up the rsync help page. I used to have them as aliases and everything worked fine. I wanted to make them functions in .bashrc so I could use some of the advantages inherent in that. But, I am unclear why this is not working.
Upvotes: 0
Views: 380
Reputation: 26016
You need to pass the argument to rsync
. It can be done using something like this:
function rsyncDAMS () {
rsync -avvPhi --no-p "$@"
}
Upvotes: 1