how to run awk programme in ubuntu

Asked by amarjyoti on 2007-04-25

how to run an awk progmme in ubuntu version of linux....

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu gnome-terminal Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
amarjyoti (amarjyotimahanta) said : #1

from a dataset , i want to extract the needed data from the data by using awk ...i have the awk programme. but how to run it in ubuntu...

Ralph Janke (txwikinger) said : #2

Thanks for the question.

I would say, the same way like on other linux or unix systems.

awk -f <program name> <data file>

<prorgam name> must be replace with your awk program, <data file> must be replace with your data file.

I think you can also make it self-executable by inserting

#!/usr/bin/awk -f

in the first line of you awk program and then add the executable permission flag for it.

I hope this helps.

Can you help with this problem?

Provide an answer of your own, or ask amarjyoti for more information if necessary.

To post a message you must log in.