I want to create a table that looks something like this, where i display the # at the front of every $2 and the Title header but I do not want to store it in my file:
Name ID Gender
John Smith #4567734D Male
Kyle Toh #2437882L Male
Julianne .T #0324153T Female
I got a result like this instead:
Name ID Gender
#
Name ID Gender
John Smith #4567734D Male
Name ID Gender
Kyle Toh #2437882L Male
Name ID Gender
Julianne .T #0324153T Female
By using this command:
awk -F: ' {print "Name:ID:Gender\n"}
{print $1":#"$2":"$3}' data.txt |column -s ":" -t