New answers tagged

1 vote

awk to process multiple lines and return several strings

This should do the trick I think: awk '/INVALID: EXPIRED/{getline;split($0,line,"/");print line[5]}'
  • 700
0 votes

Variable in AWK

The variables in awk can be transferred from shell on this way: awk -v variable=$line '..... and used inside on this way: awk -v line1=$line 'NR==21 {print ".host = "line1";"}1' ...
  • 3,420

Top 50 recent answers are included