How can you help me with my question guys?

April 3, 2011 at 15:21:09
Specs: Windows Vista
How to write a shell script which uses awk to read in the data file students.txt and output the data in the tabbed format as shown:

Surname Forename MSc Stream Date of Birth

Smith John IT 15.01.1986

Taylor Susan IT 04.05.1987

Thomas Steve MIT 19.04.1986


# do not worry if tabbed columns don’t line up.

# The distance between each of (Surname, Forename, MSc Stream and Date of Birth) column is one tab.


See More: How can you help me with my question guys?

Report •

#1
April 3, 2011 at 15:33:20
What is the question? Data to process.

Report •

#2
April 3, 2011 at 15:56:27
@wizard-fred
yes, I know, but I have added my question... thanks

Report •

#3
April 3, 2011 at 16:18:46
awk 'BEGIN {IFS=" "} {OFS="\t"} {print $1,$2,$3,$4}' input.txt

Click Here on HowTo ask good Question to get best Help
Let us know, if the problem is solved !!!


Report •

Related Solutions

#4
April 3, 2011 at 16:34:18
Here are two links that discuss building awk arrays.

# classic awk build
http://www.computing.net/answers/un...

# using 'FNR==NR'
http://www.computing.net/answers/pr...


Report •

Ask Question