This is a discussion on Create output in columns within the Shell scripting forums, part of the Development/Scripting category; Hi All, I have a txt file as below Rakesh Pune satara road, pune. 12345678 Married Now I want o/p ...
|
|||||||
| Register | FAQ | Members List | Calendar | Forgotten your password? | Mark Forums Read |
|
|||
|
Hi All,
I have a txt file as below Rakesh Pune satara road, pune. 12345678 Married Now I want o/p as below: Name Address Phone Number Status Rakesh Pune satara road, pune. 12345678 Married I was unable to create such o/p using column -t, So how can I align the o/p using shell scripting. I will using this script in both Linux and Solaris. Thanks in Advance. Last edited by rakeshrhn; 09-17-2007 at 10:46 AM.. |
| Sponsored Links | ||
|
|
|
||||
|
You should be more specific, always add quotes and exapmples in ur prob, it is easier to understand, and reply. I am doing it for you.
Quote:
I am also a newbie. Well one solution to ur problem is :-- use this code Code:
touch file3.txt (for text in `cat file1.txt`; do echo -e -n "\b$text " >> file3.txt done;) This will result in file3.txt Quote:
Hope it helps. |
![]() |
| Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| match the columns of 2 files and merge common rows | piyali_biobase | Shell scripting | 0 | 11-05-2007 07:34 PM |
| Mysql how to specify select columns | raj | Databases servers | 2 | 12-19-2006 02:23 AM |
| help me in editing this columns | sureshbup | Shell scripting | 1 | 12-12-2006 03:29 PM |
| rearranging columns in a text file | sureshbup | Shell scripting | 2 | 12-06-2006 10:43 AM |
| Calculations across different lines & columns of a file | Guest | Shell scripting | 2 | 09-16-2005 05:18 AM |