Search Results

Search: Posts Made By: newageBATMAN
1,756
Posted By Scrutinizer
Are the event descriptions (contained in every...
Are the event descriptions (contained in every file) the same for every file or can they differ per file and are they only applicable to the operating log in the file itself?


----
At any rate...
1,756
Posted By Scrutinizer
Another way (keeping the original formatting...
Another way (keeping the original formatting intact, reading the file twice):
awk '
/^Event/,/^END/ {
i=$1
sub($1,x)
A[i]=$0
}
/^Date/,/^END/ {
if(NR>FNR && !/^END/)...
2,067
Posted By Corona688
L is a variable he sets himself, to turn printing...
L is a variable he sets himself, to turn printing on and off.

O is a variable which is all the data you want jammed together.
2,067
Posted By RudiC
Try sth like (untested)awk '/xxxxxxxxx/ {if (L)...
Try sth like (untested)awk '/xxxxxxxxx/ {if (L) {print O; O=""; L=0}; O=O substr($0, length($0))}
/yyyyyyyyy/ {if (!L) {O=O" "; L=1}; O=O substr($0, length($0))}
END {print O}
...
3,381
Posted By panyam
Something like this: awk '/100614/...
Something like this:

awk '/100614/ {a=$0;c=1;next} /XXXXX/&&c {b=1;next} /END/ { b=0;next} b { printf "%s %s %s \n",$0,a,FILENAME } ' file1


Extend the same logic to handle all files.
Showing results 1 to 5 of 5

 
All times are GMT -4. The time now is 02:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy