1 2 3 4 5
$1 == "#" { print "<h1>", $0, "</h1>"; next} $1 == "##" { print "<h2>", $0, "</h2>"; next} $1 == "###" { print "<h3>", $0, "</h3>"; next} $1 == "=>" { print "<a href=\"", $2, "\">" substr($0,index($0,$3)), "</a>"; next} { print }