- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- format ouput file
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
тАО05-11-2004 09:47 AM
тАО05-11-2004 09:47 AM
format ouput file
I have created an output file which is attached to this message. I want to format the output. It is a SQL query output and i want each record to come in a single line and not get wrapped as the case now.
Can anyone please help me.
Thanks,
Andy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-11-2004 09:54 AM
тАО05-11-2004 09:54 AM
Re: format ouput file
suggestion is to run your sql query and redirect output to a file something like
sql select * from blah...blah > /tmp/sqldump
then transfer this file to your workstation using ftp rather than screen capture or log capture from a terminal emulator
Hope this helps
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-11-2004 10:12 AM
тАО05-11-2004 10:12 AM
Re: format ouput file
isql -U[user] -P[password] << EOF > output
Now i need to format this ouput so that it is better readable.
-Andy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-11-2004 10:16 AM
тАО05-11-2004 10:16 AM
Re: format ouput file
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-11-2004 11:41 AM
тАО05-11-2004 11:41 AM
Re: format ouput file
Simply: 'echo $COLUMNS' and 'stty -a' to get them.
I'm picking that one or the other is set to 80, or that 'isql' defaults to wrap-at-80. Try bumping these values up. See what the result is.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-11-2004 12:03 PM
тАО05-11-2004 12:03 PM
Re: format ouput file
Regards
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-11-2004 02:47 PM
тАО05-11-2004 02:47 PM
Re: format ouput file
This problem really should be solved in SQL.
In Oracle SQLplus lingo you would need
SET LINESIZE 999;
and probably lots of
COLUMN xxx FORMAT Ann
for example
COLUMN VENDER FORMAT A20;
Your chance to learn more SQL!
If you have to live with the file you have today, just push it through PERL or AWK (on PC or Unix box.
For example:
C:\>perl -e "<>;<>;while (<>) {for ($i=0;$i<4;$i++){chop; $_.=<>}print}" narrow.txt > wide.txt
This says...
- read and forget twice.
- main loop reading a line.
- subloop 4 times chopping of the last character (newline) and appending (the .=) an additional line.
- print (the default it to print $_)
- end main loop
Hein.