Search Results

Search: Posts Made By: mpmichael
3,525
Posted By RudiC
How about sed -n '/ERROR/p; //,/^[0-9]\{4\}-/...
How about
sed -n '/ERROR/p; //,/^[0-9]\{4\}-/ {/^[0-9]\{4\}-/!p}' /tmp/testlog2.txtTested on Ubuntu linux 17.10
3,525
Posted By vgersh99
how about awk: awk '/ERROR/' RS= sample.log
how about awk:

awk '/ERROR/' RS= sample.log
2,871
Posted By RudiC
Glad you got what you need. You can see also how...
Glad you got what you need. You can see also how important a spot-on, precise, detailed specification is... once the problem is clear, help is near.
2,871
Posted By RudiC
What's your bash version? EDIT: Drop the...
What's your bash version?

EDIT: Drop the spaces when assigning the variable:

outline="$outline"$'\n'"$line"
2,871
Posted By rovf
I don't think it is "a line", but several lines;...
I don't think it is "a line", but several lines; at least it follows from his comment. So in any case, he must have some program which extracts a set of lines from the input file and writes these to...
2,871
Posted By RudiC
It becomes a bit clearer now. You seem to read...
It becomes a bit clearer now. You seem to read lines from some text file, which by default won't contain any <new line> chars unless certain merasures taken. You don't use e.g. "command substitution"...
Showing results 1 to 6 of 6

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