ssh $remote '( df -k )' > $REMOTE_SPACE
for (( i=0; i<no_dest; i++ ))
do
ssh $remote "( aux_free_space[i]=$( du -sk ${aux_dest[${i}]} | cut -f 1 ) )"
done
All work ok apart from populating the array aux_free_space[]; i think the du runs on the local host.
- ssh $remote works fine
- aux_free_space is initialised at the beginning
- aux_dest is already populated
ssh $remote '( aux_free_space[i]=$( du -sk ${aux_mount[${i}]} | cut -f 1 ) )'ssh $remote ' aux_free_space[i]=$( du -sk ${aux_mount[${i}]} | cut -f 1 ) '