- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- parsing data
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
Forums
Discussions
Discussions
Discussions
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
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
10-19-2001 07:26 AM
10-19-2001 07:26 AM
But if you look below, there are a number of tables that have 0 bytes (empty) and I want to remove them so that I only need to look at the tables with actual data in them.
Suggestions are always appreciated.
abs_mstr 0 0 0 0 0 0.0 0.0
accd_det 0 0 0 0 0 0 0.0 0.0
acd_det 48105 2531643 37 73 52 48105 1.0 3.8
acm_mstr 0 0 0 0 0 0 0.0 0.0
act_mstr 0 0 0 0 0 0 0.0 0.0
acx_mstr 0 0 0 0 0 0 0.0 0.0
ac_mstr 472 31355 47 73 66 472 1.0 5.7
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2001 07:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2001 07:43 AM
10-19-2001 07:43 AM
Re: parsing data
How about:
grep [1-9] filename
Rgds, Robin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2001 07:44 AM
10-19-2001 07:44 AM
Re: parsing data
Something like this:
cat infile | awk '{ if ((($2 + 0) > 0) || (($3 + 0) > 0)) print $0 }'
or pipe the output of your command to the awk. Note: The $2 + 0 forces the comparison to be numeric.
Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2001 08:09 AM
10-19-2001 08:09 AM
Re: parsing data
awk will help you to simplify this. You can print out only those lines that satisfy the condition on a particular (or a group of) column. If you want the second column (it is $2 in awk's parsing) to be determined as non-zero, you would give
awk '$2>0 {print $0}' your_file
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2001 08:17 AM
10-19-2001 08:17 AM
Re: parsing data
grep -v "0 0 0 0 0 0.0 0.0" filename
This will print all lines that do not have a "0 0 0 0 0 0.0 0.0" pattern in them.
Lou Zirko
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2001 08:32 AM
10-19-2001 08:32 AM
Re: parsing data
issue closed.