- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Reorganise a log file using script
Operating System - HP-UX
1757208
Members
2335
Online
108858
Solutions
Forums
Categories
Company
Local Language
юдл
back
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
юдл
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
тАО04-29-2003 12:07 AM
тАО04-29-2003 12:07 AM
Hello,
I was given a task to write a script to reorganise a record in multiple lines into a single line identified by the ID number for example '00719 00001'. The sample log are as below:
00719 00001 maxis1d2 09/04/03 15:31:41 logger wap
logger: connection to system wap failed;
cu: Connect failed: SYSTEM NOT IN Systems FILE
00599 00001 maxis1d2 09/04/03 15:31:50 executive omcrkll6
exec: cannot execute /export/home/appadmin/bos/kevdir/a.out, errno = 2
07698 00001 maxis1d2 09/04/03 07:31:54 rtfwd
rtfwd: Error opening message log file, /bos/NOC/rts/lluminet/illuminet_log, errno 2
07724 07723 maxis1d2 09/04/03 15:32:00 alarmx
alarmx: Cannot send alarm to display
alarm display = SYS_DOWN, errno = 13, alr_errno = 72
How can I write a Unix shell script to process such log? I am facing the problem because it does not consist a fix number of line for one record. It may come from 2 or 3 lines.
Attached is the log file sample. Appreciate if you could show me how to overcome this problem.
Thank you very much.
Regards,
Melvin
I was given a task to write a script to reorganise a record in multiple lines into a single line identified by the ID number for example '00719 00001'. The sample log are as below:
00719 00001 maxis1d2 09/04/03 15:31:41 logger wap
logger: connection to system wap failed;
cu: Connect failed: SYSTEM NOT IN Systems FILE
00599 00001 maxis1d2 09/04/03 15:31:50 executive omcrkll6
exec: cannot execute /export/home/appadmin/bos/kevdir/a.out, errno = 2
07698 00001 maxis1d2 09/04/03 07:31:54 rtfwd
rtfwd: Error opening message log file, /bos/NOC/rts/lluminet/illuminet_log, errno 2
07724 07723 maxis1d2 09/04/03 15:32:00 alarmx
alarmx: Cannot send alarm to display
alarm display = SYS_DOWN, errno = 13, alr_errno = 72
How can I write a Unix shell script to process such log? I am facing the problem because it does not consist a fix number of line for one record. It may come from 2 or 3 lines.
Attached is the log file sample. Appreciate if you could show me how to overcome this problem.
Thank you very much.
Regards,
Melvin
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-29-2003 12:09 AM
тАО04-29-2003 12:09 AM
Re: Reorganise a log file using script
The sample log file as attached.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-29-2003 12:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-29-2003 01:55 AM
тАО04-29-2003 01:55 AM
Re: Reorganise a log file using script
Yes, it works. You are superb Robin. Thanks a lot and it solves my problem.
Regards,
Melvin
Regards,
Melvin
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP