just an example:
This works fine:
ssh ahost1 uptime >ahost1_uptime
This doesn't work at all:
for i in ahost1 ahost2;do ssh $i 'uptime' >$i_uptime;done
(instead of writting the outputs to files I got the 'uptimes' on stdout)
I need to save the output in separate file on local machine (where the "for" loop is being run).
thx for any tip,!
This works fine:
ssh ahost1 uptime >ahost1_uptime
This doesn't work at all:
for i in ahost1 ahost2;do ssh $i 'uptime' >$i_uptime;done
(instead of writting the outputs to files I got the 'uptimes' on stdout)
I need to save the output in separate file on local machine (where the "for" loop is being run).
thx for any tip,!