AllExperts > Unix/Linux OS 
Search      
Unix/Linux OS
Volunteer
Answers to thousands of questions
 Home · More Unix/Linux OS Questions · Answer Library  · Encyclopedia ·
More Unix/Linux OS Answers
Question Library

Ask a question about Unix/Linux OS
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Suchitra Joshi
Expertise
I can answer questions related to Basic Unix commands, shell scripts, sed, awk, job scheduling & vi editor.

Experience
15 years of experience in Unix and Shell scripting

Education/Credentials
B.Sc (Electronics), Diploma in Computer Applications (DCA)

 
   

You are here:  Experts > Computing/Technology > Focus on Unix > Unix/Linux OS > echo command

Unix/Linux OS - echo command


Expert: Suchitra Joshi - 10/26/2009

Question
Hi! If i want to output information about a file in this format:

-rw------- 1 lczegel users   270 Jan 28  2007 f2.c

how do i do it using echo. i did echo $file and it gives me but in this format:
-rw-------
1
lczegel
users   
270
Jan
28  
2007
f2.c

so how do i get to give me like the first format?

Thank You

Answer
Hi Ryan,

I am not sure what is stored in $file. But you can try one of the following and check whether it works

1) echo "$file"

or

2) echo -n $file

Since I do not have Unix setup, I cannot try from my end. If this doesn't work, give me all the details about what is exactly required to be done.

Hope this helps.

Regards

Suchitra

Add to this Answer   Ask a Question


 
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.