![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Formatting | mirusnet | Shell Programming and Scripting | 3 | 01-06-2008 11:38 PM |
| Formatting using awk | cdunavent | Shell Programming and Scripting | 2 | 03-18-2003 02:09 PM |
| Text formatting to 132 columns | jmossman | UNIX for Dummies Questions & Answers | 16 | 05-06-2002 08:34 PM |
| formatting | xeron | UNIX for Dummies Questions & Answers | 5 | 03-20-2002 11:33 AM |
| formatting | darryll777 | UNIX for Dummies Questions & Answers | 1 | 03-04-2002 01:15 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Formatting info into columns
Hi
This question has kind of been asked before but I couldn't get any of the solutions to work. I need to format fields being cut from a file into columns so it looks like a table. e.g Full name Address Hiredate Joe Smith London 11.01.01 Bill King Liverpool 15.05.99 Harry Bloggs Leeds 12.11.04 I belive awk is used but I'm not sure how, if anyone could help that would be great Thank you |
|
||||
|
Quote:
I have table, would like to output fisrt column each line. Used awk as anbu's but output just in one line. Hope your helps. Thanks. |
|
||||
|
Quote:
Code:
awk ' { printf("%-20s%-15s%10s\n",$1" "$2,$3,$4) } ' file
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|