I have requirement to connect to remote machine and then get info and pipe to while loop.
ssh rao@172.168.1.123 "find ~/listfile/ -iname \"*log*\" |while read line; do cat $line; done"
The above commands is printing empty lines. I tried find itself to check command and it does works and list files.
ssh rao@172.168.1.123 "find ~/listfile/ -iname \"*log*\""
How do I see the content of files found?
$incat $lineinside loop. – Archemar Sep 20 '17 at 14:42