Search Results

Search: Posts Made By: PacificWonder
1,735
Posted By PacificWonder
try the rearranged command as follows. ...
try the rearranged command as follows.

./test.sh 2>&1 >test.txt
15,982
Posted By PacificWonder
Awewsome! That's so cool. Thanks. :D
Awewsome! That's so cool. Thanks. :D
15,982
Posted By PacificWonder
I adopted the command as follows: awk...
I adopted the command as follows:
awk '/ERROR/{a=$0}/PROCESSING/ && a {print a;a=""}' parts.txt

and got the following...

7 ERROR processing part!
23 ERROR processing part!

The expected...
15,982
Posted By PacificWonder
Sorry for my reverse logic. But I was trying to...
Sorry for my reverse logic. But I was trying to avoid some of the intermediate 'PROCESSING' lines that I dont need to report.
15,982
Posted By PacificWonder
further clarification
Thanks for the awk command - it works!, but not entirely. :confused:

Consider my input file parts.txt as follows.
1 useless line....
2 useless line....
3 useless line....
4 PROCESSING PART 111...
15,982
Posted By PacificWonder
"Or does "first up" in steps 3 and 5 mean the...
"Or does "first up" in steps 3 and 5 mean the latest B before the current A?"

Yes, I only need to get the latest pattern B preceeding the current pattern A.

Thanks.
15,982
Posted By PacificWonder
I need to clarify step 3 and 5. suppose I...
I need to clarify step 3 and 5.

suppose I find pattern A on line 25 of the input text file, now I need to find the first occurence of pattern B from lines 25 through 1 of the file - in reverse....
15,982
Posted By PacificWonder
reverse search a text file from a specified line
Hello All,

I have a following task that I need to accomplish through a script or program and I am looking for some help as I have exhausted my ideas.

1. given: a text file with thousands of...
50,022
Posted By PacificWonder
Cool. I overlooked the $ error in awk part of the...
Cool. I overlooked the $ error in awk part of the script. Your suggested solution works! Thanks a lot for your help Rubin.
50,022
Posted By PacificWonder
AWK - if last line/record do something
Hello:

I am trying to perform a certain action if the current record is the last line of the input file. But I am unable to figure out how to determine the last line of a file in awk.

I need to...
Showing results 1 to 10 of 10

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