|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi, when I enter ' Code:
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 Code:
var1=$(remsh hostname -l username ps -ef|grep process_name |grep -v grep) echo $var1 i am getting the output in a single line. Last edited by Scrutinizer; 07-05-2012 at 01:25 AM.. Reason: code tags |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
try echo with double quotes Code:
echo "$var1" |
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
thank you.
it worked |
| Sponsored Links | ||
|
![]() |
| Tags |
| multiple values, variable |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Read multiple values from sqlplus in perl | Pratik4891 | Shell Programming and Scripting | 4 | 08-26-2011 01:25 PM |
| AWK: read values from file1; search for values in file2 | Bubnoff | Shell Programming and Scripting | 2 | 12-01-2009 06:18 PM |
| trouble using read to store values in variables from command output | ProGrammar | UNIX for Dummies Questions & Answers | 2 | 01-09-2009 10:09 AM |
| split varibles and store fields into shell varible array | gratus | Shell Programming and Scripting | 3 | 10-11-2007 02:50 PM |
| Using varible/varible substitution in Perl/sed Search & Replace | Breen | Shell Programming and Scripting | 3 | 05-08-2002 05:45 AM |
|
|