While loop in SSH command
I am having trouble getting the while loop to execute in the ssh command:
ssh $USERID@serverX "while read line do echo $line done<$list_dir/cost_feed.lst.old"
Error: bash: -c: line 1: syntax error: unexpected end of file
I have managed to use simpler commands with ssh like:
ssh $USERID@serverX "pwd; cp x y"
I expect that I need to add some combination of escape characters or semicolons, but if anyone can point me in the right direction, i would appreciate it.