Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Boolean expresion

Status
Not open for further replies.

Currando

ISP
Feb 13, 2001
25
ES
Hi,
I´ve a problem with awk script, i need print all lines from the input file until a character - or white line. I make the next script for this:
{
if (/arrakis/) {
do {
print
getline
} while (!/-/)
if (/EOF/) {print}
print "-"
} else next

I need that apart from the condition while (!/-/) validate if is a white line

Anyboy help me
 

Hi, Currando!

I didn't quite understand your question, but I give you solution to "print all lines from the input file until a character - or white line:"

/^$/ || /-/ { exit }

{ print }


Jesus loves you.

KP.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top