This is a script I use to sync remote and local directories.
Note that the examples directory contains hidden files.
See also:
https://github.com/arcalex/racktk
This is also a fun demo of shell programming.
See commit 10dd10e for an interesting way to set the value of 'r'.