- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Reformatting text
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-21-2009 11:50 PM
тАО06-21-2009 11:50 PM
I received the following output after an SQL script:
TradeId CommonRef MirrorId TermAssignStatus Book
P/S Customer Currency Curve Effective Date
Maturity Date Notional Amount Product Type Rate
Trade Status Sec Amount Trade Date Trader ParentId
Last Update
That's actually an excerpt, there are 22k entries with this format. Instead of those 8 columns what I'd need a single line with every entry being it's own column. I've attached a text file with the original format and how I'd like it reformatted.
I've been trying awk but I can't seem to find the way to do it, can someone give me a tip on this?
Thanks and Regards,
Ciro
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-21-2009 11:52 PM
тАО06-21-2009 11:52 PM
Re: Reformatting text
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-22-2009 12:21 AM
тАО06-22-2009 12:21 AM
Re: Reformatting text
suppose your data stored on a file "d"
In the command prompt write this line,
#awk '{ printf "%s", $0 }'
if you want your output into another file then do like this
#awk '{ printf "%s", $0 }'
Suraj
- Tags:
- awk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-22-2009 01:29 AM
тАО06-22-2009 01:29 AM
Re: Reformatting text
Hi Suraj,
Thanks for your help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-22-2009 02:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-22-2009 02:48 AM
тАО06-22-2009 02:48 AM
Re: Reformatting text
Hi Dennis,
Yes that's what I needed, thanks very much.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-22-2009 04:43 AM
тАО06-22-2009 04:43 AM
Re: Reformatting text
To combine multiple lines into one you can use 'paste'.
# paste -d" " - - - - - < myfile
See the manpages for more information.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-22-2009 08:03 AM
тАО06-22-2009 08:03 AM
Re: Reformatting text
thats an application of paste / redirection I'd never encountered before. nifty!