#!/usr/bin/awk -f # Based on: # BEGIN { FS = "\t" } { # Gopher if ($1 && $3 && $4) { port = substr($4, 1, length($4) - 1) type = substr($1, 1, 1) # Title print substr($1, 2) if (type !~ /i|\./) { if (type == "h") { gsub(/^URL:/, "", $2) print "<" $2 ">" } else { if (port == 70) { print "" } else { print "" } } } } else { print $0 } }