On Wed, Jul 17, 2013 at 08:42:17PM +0000, gscantlen@comcast.net wrote:
> I wish to ssh this command to several hosts:
> ls -alst "dir_with_spaces"
for host in "${hosts[@]}"; do
ssh "$host" bash <<-'EOF'
ls -alst "your directory"
EOF
done
The - in front of the here document's delimiter allows indentation with
tabs only (not spaces).
I Cc'ed help-bash@gnu.org because that's more appropriate for this
question.