Re: IGNOREEOF and POSIXLY_CORRECT don't ignore invisible vars

2016-06-20 Thread L. A. Walsh
Chet Ramey wrote: Think it through. A variable is not set until it has been assigned a value. Giving a variable an attribute (in this case, the `local' attribute) without assigning a value means that the variable is still unset. For example, Unless it was set in the global cont

Re: IGNOREEOF and POSIXLY_CORRECT don't ignore invisible vars

2016-06-20 Thread Grisha Levit
Linda, I think the second example is more clear if made more explicit, like: set -o posix f() { local POSIXLY_CORRECT; unset POSIXLY_CORRECT; shopt -p -o posix; } f

Re: IGNOREEOF and POSIXLY_CORRECT don't ignore invisible vars

2016-06-20 Thread Chet Ramey
On 6/18/16 7:59 PM, Linda Walsh wrote: > Grisha Levit wrote: >> The manual references these values being set, not just declared, so maybe >> should check for invisible_p? > --- > Why? I.e. what were you wanting to happen? Think it through. A variable is not set until it has been assigned a valu

Re: help with rsync and Missing trailing-" in remote-shell command.

2016-06-20 Thread dpich
Thanks for the advise! That did it. The command is working fine now with the following setup: currentuser="$(id -u -n)" OPTS=(-q -avz --delete -e 'ssh -i /home/'$currentuser'/.ssh/id_rsa' --rsync-path='sudo rsync') SRC=(/etc/nginx/) RSYNC_CMD=(rsync) for h in balancer0{1..2} ; do DST=$curren

Re: help with rsync and Missing trailing-" in remote-shell command.

2016-06-20 Thread Greg Wooledge
On Fri, Jun 17, 2016 at 01:57:33PM -0700, dp...@realtruck.com wrote: > OPTS=(-q -avz --delete -e \'ssh -i /home/$currentuser/.ssh/id_rsa\' > --rsync-path=\'sudo rsync\') You want: OTPS=(-q -avz --delete -e "ssh -i /home/$currentuser/.ssh/id_rsa" --rsync-path="sudo rsync") OPTS+=( whatever