- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: awk: Line SELECT arl_region_co cannot have mor...
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-01-2009 09:41 PM
тАО06-01-2009 09:41 PM
awk: Line SELECT arl_region_co cannot have more than 199 fields?
i am not able run following script.please do the needful
Script:
ora_error.sh
sdate=`date +%a" "%b" "%e`
awk -vvar="$sdate" '$0 ~ var {x++} /ORA/ && x' /oracle/app/admin/bdump/alert.log >> /home/oracle/ora_err.txt
ERROR:
awk: Line SELECT arl_region_co cannot have more than 199 fields.
The input line number is 462333. The file is /oracle/app/admin/bdump/alert.log.
The source line number is 1.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-01-2009 11:59 PM
тАО06-01-2009 11:59 PM
Re: awk: Line SELECT arl_region_co cannot have more than 199 fields?
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1330239
If you aren't using fields, you need to fool awk into using some different field delimiter:
awk -F"^A" -vvar="$sdate" '$0 ~ var {x++} /ORA/ && x' /oracle/app/admin/bdump/alert.log >> /home/oracle/ora_err.txt
I've used a control-A after that -F.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-02-2009 01:08 AM
тАО06-02-2009 01:08 AM
Re: awk: Line SELECT arl_region_co cannot have more than 199 fields?
thanks it is working. i have one more problem. i want two extract two fields. that fields are ORA and SYSTEM
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-02-2009 01:49 AM
тАО06-02-2009 01:49 AM
Re: awk: Line SELECT arl_region_co cannot have more than 199 fields?
This is a problem, we just got through removing all fields.
What is your definition of a field for "ORA and SYSTEM"?
I suppose you could use split($0, fields, "[[:space:]]*"). You would then have to ignore the first field if empty.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-02-2009 06:35 PM
тАО06-02-2009 06:35 PM
Re: awk: Line SELECT arl_region_co cannot have more than 199 fields?
awk -F"^A" -vvar="$sdate" '$0 ~ var {x++} /ORA/ && x' /oracle/app/admin/bdump/alert.log >> /home/oracle/ora_err.txt
this script is providing all ORA error. but i want to get ORA200 and ora300 errors only
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-02-2009 10:52 PM
тАО06-02-2009 10:52 PM
Re: awk: Line SELECT arl_region_co cannot have more than 199 fields?
awk '{
m=split($0,a,"
for (i=1 ;i<=m;i++){
if ($i ~ /ORA/){
}
}
} yourfile
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-02-2009 11:12 PM
тАО06-02-2009 11:12 PM
Re: awk: Line SELECT arl_region_co cannot have more than 199 fields?
awk -F"^A" -vvar="$sdate" '
$0 ~ var {x++}
(/ORA200/ || /ora300/) && x { print $0 }'