Hallo all,
Could someone quickly refresh my tired mind please.
I have two lines that look like:
First Name: John
Last Name: Doe
and I would like to merge that to one line <name>John Doe</name>.
/^ First Name/ { gsub(/&/,"and") pr(); first = $2 ; next }
/^ Last Name/ { pr(); $0 = "<name>" first " " $2 "</name>"
print; next}
but I only get this result
<name> </name>
What am I missing here?
Could someone quickly refresh my tired mind please.
I have two lines that look like:
First Name: John
Last Name: Doe
and I would like to merge that to one line <name>John Doe</name>.
/^ First Name/ { gsub(/&/,"and") pr(); first = $2 ; next }
/^ Last Name/ { pr(); $0 = "<name>" first " " $2 "</name>"
print; next}
but I only get this result
<name> </name>
What am I missing here?