LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 06-06-2011, 08:05 PM   #1
aruna t
LQ Newbie
 
Registered: May 2011
Posts: 7

Rep: Reputation: 0
output formatting


hello sir,
i hav a shell script that outputs few variables. i want to output them in a table format.can u help me in doing it by suggesting any unix commands.
the output i need is
input output
a,b c
 
Old 06-06-2011, 11:44 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,758

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
I can't see that you need any specific commands ... you control the script and the script controls the output. Can you provide an example of the current output as opposed to what you want ?
 
Old 06-06-2011, 11:53 PM   #3
aruna t
LQ Newbie
 
Registered: May 2011
Posts: 7

Original Poster
Rep: Reputation: 0
i want the ouput to in two columns
input output
a,b d,e
c
at present the output am getting is
input output
a,b
c
d,e
where d,e should be in output column..
 
Old 06-07-2011, 12:23 AM   #4
grail
Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 7,502

Rep: Reputation: 1893Reputation: 1893Reputation: 1893Reputation: 1893Reputation: 1893Reputation: 1893Reputation: 1893Reputation: 1893Reputation: 1893Reputation: 1893Reputation: 1893
So show us your current code and we can try and help you with the issue.
 
Old 06-07-2011, 04:30 AM   #5
ssrameez
Member
 
Registered: Oct 2006
Location: bangalore
Distribution: Fedora, Ubuntu, Debian, Redhat
Posts: 82

Rep: Reputation: 6
Hello Aruna.
To help you more with this, we need the snippet of the data you are processing.. not just abcd.
Also if you could provide the script that you are using, we can give some suggestions..

Also Perl is a good option for doing the string formatting operations.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Output formatting . pinga123 Linux - Newbie 6 03-25-2011 03:04 AM
formatting iostat output suran Linux - General 4 07-14-2009 07:00 AM
[SHELL] Output formatting Adrnalnrsh Programming 3 09-22-2008 10:29 AM
Formatting output krock923 Programming 2 06-07-2006 07:26 AM
Formatting output of ls doodar Linux - Newbie 29 07-29-2004 01:25 PM


All times are GMT -5. The time now is 03:20 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration