Hypothetical shell usages (1) & (2).

(1)
Restore() { \
  source=somewhere/Backup/ ;
  echo "source is $source." ;
  destination=elsewhere/workingDirectory ;
  echo "destination is $destination." ;
  rsync \
  --exclude '*.mp3' \
   --exclude '*.mp4' \
  -anuv $source $destination ; }

(2)
exclusions='*.mp3'
exclusions+='*.mp4'
Restore() { \
  source=somewhere/Backup/ ;
  echo "source is $source." ;
  destination=elsewhere/workingDirectory ;
  echo "destination is $destination." ;
  rsync \
  -anuv --exclude=$exclusions $source $destination ; }

In a realistic case, there are more than two exclusion patterns. 
Comments or suggestions about the two possibilities?  Astonishingly 
better ideas?  =8~o

Thanks,                        ... P.

-- 
VoIP:   +1 604 670 0140
work: https://en.wikibooks.org/wiki/User:PeterEasthope

Reply via email to