Hi,
Consider the data (FS = |):
1| England |end
2| New Zealand |end
3|Australia|end
4| Some Made Up Country |end
5| West Indies|end
I want the output to be (i.e. without the leading and trailing white space from $2)
England
New Zealand
Australia
Some Made Up Country
West Indies
any ideas on how its done in awk??
---------- Post updated at 03:25 PM ---------- Previous update was at 03:07 PM ----------
this works
BEGIN {
FS = "|"
OFS = "|"
}
{
gsub(/^[ \t]+|[ \t]+$/, "", $2); print $2
}