Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 08-12-2003, 06:06 AM   #1
Registered: Oct 2002
Location: Ayrshire, Scotland
Distribution: Suse(home) RHEL (Work)
Posts: 263

Rep: Reputation: 30
How do I run an awk script?

If I create a small awk file called find.awk:

split("hello world how are you", a)
for (i=1; i<=5; i++)
print a[i]

and run the command:

awk -f find.awk waits for input from the keyboard. What should I be doing to get it to run, then return to a command prompt?


Last edited by davee; 08-12-2003 at 07:00 AM.
Old 08-12-2003, 09:21 AM   #2
Registered: Jul 2003
Location: NL
Distribution: My own
Posts: 92

Rep: Reputation: 18
echo | awk -f find.awk
Old 08-12-2003, 09:46 AM   #3
Registered: Oct 2002
Location: Ayrshire, Scotland
Distribution: Suse(home) RHEL (Work)
Posts: 263

Original Poster
Rep: Reputation: 30
Thank you!



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
writing awk script files bigmark Linux - Software 1 10-19-2005 11:33 AM
About awk script sachin_keluskar Linux - Software 2 06-24-2005 04:19 AM
AWK script is hanging our server Hans Zarkoff Programming 10 08-20-2004 02:32 PM
Passing variables from AWK script to my shell script BigLarry Programming 1 06-12-2004 05:32 AM
on Network Up Script run? On Battery power run script? v2-ncl Linux - General 0 12-08-2003 10:34 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:12 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration