listing in 1 line


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users listing in 1 line
# 1  
Old 12-11-2008
listing in 1 line

hi

when I do
ps -aef | grep ....

I get the different parts each on 1 line.


if I do

a=`ps -aef | grep ...`
echo $a

I receive the result on 1 line. how to display it as before? i.e. each on 1 line?

thx
# 2  
Old 12-11-2008
simpleSmilie
Code:
a=`ps -aef | grep ...`
echo "$a"

# 3  
Old 12-11-2008
wow.

i did not get the rule and the effect of this " "

thanks
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Get an output of lines in pattern 1st line then 10th line then 11th line then 20th line and so on.

Input file: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 (6 Replies)
Discussion started by: Sagar Singh
6 Replies

2. UNIX for Dummies Questions & Answers

[Solved] How to remove listing of current user cmd from ps -ef listing?

Hi All, Could you please help to resolve my following issues: Problem Description: Suppose my user name is "MI90". i.e. $USER = MI90 when i run below command, i get all the processes running on the system containing name MQ. ps -ef | grep MQ But sometimes it lists... (8 Replies)
Discussion started by: KDMishra
8 Replies

3. Shell Programming and Scripting

how to read the contents of two files line by line and compare the line by line?

Hi All, I'm trying to figure out which are the trusted-ips and which are not using a script file.. I have a file named 'ip-list.txt' which contains some ip addresses and another file named 'trusted-ip-list.txt' which also contains some ip addresses. I want to read a line from... (4 Replies)
Discussion started by: mjavalkar
4 Replies

4. Shell Programming and Scripting

Retriving the first line of data from the listing

Hi All, I have a problem of retrieving the first line of data from the listing i got back from this command : ls -l * | awk '{print $9}' | awk -F. '{print $3}' | sort -g the files names are in the folder are like month.dat.201010210400 day.dat.201010210401 year.dat.201010210402 ... (2 Replies)
Discussion started by: chipmuns
2 Replies

5. Shell Programming and Scripting

How do I get only the file name from a listing?

Hi, I am trying to get a file name only. Could anyone help me on the same. Meaning I have a file say list.out which holds below output ./xyz/abc.txt ./xyz/hij.txt I want an output as below abc.txt hij.txt i.e I want to delete everything before abc.txt Please help me out if any one has... (4 Replies)
Discussion started by: spark
4 Replies

6. UNIX for Dummies Questions & Answers

Listing files

how would i list all files, directories and exectable files in my directory? is there anyway to find out what date a file was created? Thanks!! (2 Replies)
Discussion started by: trob
2 Replies

7. UNIX for Dummies Questions & Answers

IP and VIP listing

Its been some time since I've logged on to a Unix system and I've forgotten the command which I need to use to obtain: a list of IPs and VIPs for the host server I've logged on to. What is this command? By the way, what command will yield a display of the IP addresses given a host name? (1 Reply)
Discussion started by: ivanachukapawn
1 Replies

8. UNIX for Dummies Questions & Answers

How can i get directory listing?

Hai friends is there any command in unix that display only directories... (I have 5 directories in my home directory, and i also have some files along with directories...But when i tried to show the directory listing using the command ls -d i wasn't presented by the directory listing...Please... (2 Replies)
Discussion started by: haisubbu
2 Replies

9. UNIX for Dummies Questions & Answers

Recursive directory listing without listing files

Does any one know how to get a recursive directory listing in long format (showing owner, group, permission etc) without listing the files contained in the directories. The following command also shows the files but I only want to see the directories. ls -lrtR * (4 Replies)
Discussion started by: psingh
4 Replies

10. UNIX for Dummies Questions & Answers

Listing words from a file on a Separate Line

Hi, I want to list all the words in my file on a separate line. I am using the bourne(sh)/bourne again shell(bash). Thanks, theA (2 Replies)
Discussion started by: Astudent
2 Replies
Login or Register to Ask a Question