Search Results

Search: Posts Made By: Prev
3,287
Posted By Franklin52
Another one: awk -F= '/^Begin/{s=x}NF==2{s=s?s...
Another one:
awk -F= '/^Begin/{s=x}NF==2{s=s?s OFS $2:$2} /^End/ && s {print s}' file
3,287
Posted By zaxxon
Your example output seems missing a "some" in the...
Your example output seems missing a "some" in the 1st line. Anyway:

# awk -F= '/^Begin DS/ {i++} i && /^var[0-9]=/ {a ? a=a " " $NF : a=$NF } /^End DS/ {print a; a=x; i--}' infile
some text 2 b...
Showing results 1 to 2 of 2

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