I'm only any good with php, but here's my two cents anyway. write a script to read the file, search (think ereg() or egrep_replace()) for \n characters, then stript them. Include a few lines to remove '-''s and entire lines containing 'logNo : '.
Your requirement is a little vague. Are you showing the output for your entire sample input? If so, how do you know which entries to skip?
Perl is a fine tool for such programs, as are awk, ruby, ... But understanding your problem adequately is one key to getting a solution. (I'm prejudiced: I would never recommend a shell for a job like this.)
Stuff like this reminds me why I don't use csh. Here's an awk solution. On Solaris, you have to use /usr/xpg4/bin/awk; FreeBSD 4.8 uses nawk (and perhaps awk, but on 4.8 awk is gawk, though that's changing in 5.x ...)
Put this in a file (call it "scanlog", perhaps) and mark it executable. Then invoke it like this:
The entire thing operates in a single pass over the file with a single process. Your solution creates 4 * n + 1 processes, where "n" is the number of events that matches your input pattern.
I have a requirement to prepare a report.
We validate some incoming data fields and create validation_error reports which will contain records which do not pass validation. Once files are processed they will all be dropped under one folder.
EMPLOYEE_20140915.txt... (8 Replies)
Hello,
I m working on virtualization and saved the templates in virtual server. On creating the new Virtual machine or linux system, is there a way where during booting, it should prompt for new IP address, gateway, DNS and hostname?
Or is there any configuration in linux where we can modify... (5 Replies)
I have installed apache2 on Solaris machine with the binary. So i dont want to install the same binary across all the systems but only want to copy the lib files and the files which have been updated in this installation process.
So in order to get those lib files and then prepare a tar package... (5 Replies)
Hi,
Couldnt find the right string" to search for a similar question..so dont know if this has been answered yet...problem is that I want to prepare a command with the requisite parameters passed as a string before executing it...eg: the ls command ..
I can pass "-l", "-t" as parameters and... (12 Replies)
Hi
I am working on perl for last 3 yrs and as part of knowledge sharing i have been told to conduct sessions with other teams.Only 1 session with basic details. My problem is i am not sure what all should i cover in this tut ? because i learned perl on my own. so i am not sure where to start... (4 Replies)
File 1 data:
TestA
TestB
TestC
File 2 data:
TestA
TestD
TestE
My Output File (pick all from both and create a file without duplicate data)
----------------------------------------------------------------------
TestA
TestB
TestC (3 Replies)
Hi All,
I need some advice on dual booting a dell box so that I can have WinXP and Solaris 10 OS there. The question is, what is the best way of preparing the hdd for prior to installation?
I have used created two partition, one for xp and the and the other unallocated partition for Solaris.... (3 Replies)