How to store/read multiple values from a varible

view full story

http://www.unix.com – Hi, when I enter 'ps -ef| grep process_name'/'psu | grep process_name', i am getting multiple number of lines output( i mean multiple no of processes).how can i store it one by one and echo it in the same way(one by one). part of script is var1=$(remsh hostname -l username ps -ef|grep process_name |grep -v grep) echo $var1 i am getting the output in a single line. (HowTos)