Format Column


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Format Column
# 1  
Old 04-29-2010
Format Column

I need a script that takes it input wither it be from a file or inputed as variables and sort that into three columns. Thanks
# 2  
Old 04-30-2010
Please be more specific.
Explain your requirement and give the example.
# 3  
Old 04-30-2010
I know you have to use the pr command just can't figure out how to get it to work.

Say you run the ./script varbale varable varable etc
i want them outputed into three columns
or if i do ./script filename
i want the same done
# 4  
Old 04-30-2010
I don't know if I'm getting you fully but a possible approach:

<edit>

EDIT: Never mind, I got it all wrong. You want three columns, not a single one. :P

Could you please clarify a little further?

Last edited by verdepollo; 04-30-2010 at 12:33 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Presenting data in column format

I have written a script that that takes file names and breaks them apart. File names are : aal_mock.war.deployed AuroralMockService-1.0.war.deployed consumerProfile.war.deployed EbillMock.war.deployed IAMAOGServices.war.deployed IAMPermission.war.deployed... (5 Replies)
Discussion started by: Junaid Subhani
5 Replies

2. Shell Programming and Scripting

Format column datas

I have some data like this: 4258092 TRXCODE a 19 CARDNBR a 10 PINFLAG a 6 FUISSUER a 12 PRODUCT a 24 STATE n 1 I want out put this format: <?xml version="1.0" encoding="GB2312"?> <convGrp> <grpid>4258092</grpid> <script> <!]> ... (4 Replies)
Discussion started by: hhdzhu
4 Replies

3. Homework & Coursework Questions

How to display in column format?

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: I would like to know how to display my output to this format below: 5000 Bash 300 zsh 0 sh ... (4 Replies)
Discussion started by: scopiop
4 Replies

4. Shell Programming and Scripting

Format width of a single column

I have a tab delimited table with more than 126 columns. One of the columns however contains more than 90 characters and this makes the table really difficult to read. I know I can use awk and printf to format the width but then I'll need to write, $1, $2, $3, ...: awk '{OFS = FS = "\t"} {... (2 Replies)
Discussion started by: ivpz
2 Replies

5. Shell Programming and Scripting

Not able to convert the second column to required format

I have this file 103,7243534512111,NiaC1-02 105,720412845543550,NiaC2-00 105,720439254543351,NiaC200 105,720445724354315,Nia100 105,72044770454398,Nia100 105,720484154334546,Nia616 i want in this format insert into aildump values(103,'7243534512111','NiaC1-02'); I'm able to... (3 Replies)
Discussion started by: nikhil jain
3 Replies

6. Shell Programming and Scripting

Want to format column of a text file

Hi Techies I have written a script which is collecting the logs of job running on server and let mail me the output. I want to format column of output, please help. CCMS_BAU_from_CACHE RUN ETL_SUBSITE_TO_SITE_BAU RUN GetClient_Prep_Main RUN MDM_Client_BAU RUN Sweeper RUN... (11 Replies)
Discussion started by: atul9806
11 Replies

7. Shell Programming and Scripting

Column format using echo in aix

Hi Friends, I have the following values in echo "$csi_tas_id" echo "$platform" echo "$region" I want to display these values as shown below: CSI_TAS_ID | PLATFORM | REGION 123 | UNIX | SG 231 | AIX ... (1 Reply)
Discussion started by: dbashyam
1 Replies

8. Shell Programming and Scripting

How to format a column

Hi everybody I want to manipulate the output of this command: df -h to something like this: df -h | awk '{print"\t\t "$1"\t\t"$6"\t\t"$2"\t\t" $4}' | sed 's/Mounted/Mount Point/g' | sed 's/Avail/Free Space/g'but my problem is: if for example the mounting point is a long name everything beside... (3 Replies)
Discussion started by: ialbert
3 Replies

9. Shell Programming and Scripting

AWK CSV to TXT format, TXT file not in a correct column format

HI guys, I have created a script to read 1 column in a csv file and then place it in text file. However, when i checked out the text file, it is not in a column format... Example: CSV file contains name,age aa,11 bb,22 cc,33 After using awk to get first column TXT file... (1 Reply)
Discussion started by: mdap
1 Replies

10. UNIX for Dummies Questions & Answers

Format a column of text

Hi I have a LONG ! column of text and I would like to format this into several columns. so from this abcd efgh ijkl mnop qrst uvwx yz12 to this abcd efgh ijkl mnop qrstu vwx yz12 (2 Replies)
Discussion started by: mlucas
2 Replies
Login or Register to Ask a Question