Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Interactive input and awk

Status
Not open for further replies.

ranjit

Technical User
Apr 14, 2000
131
0
0
GB
How would I use awk in an interactive manner? That is, prompting for user input...doing a calculation and re-prompting?

BEGIN {

while (ARGC<3) {

print sqrt(ARGV[1])

}
}

I looking for somthing like this however i don't know how to re-read in user input or an exit statement to break the loop.
 
Do a search in this forum for /dev/tty

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
PHV,

Many thanks - that's done the trick.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top