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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

No Response from Command Line 1

Status
Not open for further replies.

alex20850

Programmer
Mar 28, 2003
83
US
I am running awk95.exe on Windows 2000 in a dos prompt window.
I typed in awk "Begin {print \"Don't panic!\" }" and then press Enter.

I get a blank line with no response and it is there permanently.

If I do Ctrl+C, then I get a prompt.

If I type the commands into a file and run the file, it works.

Is there some setting I need to turn on?

Thanks,
Alex
 
Right. Unlike Pascal, awk is case-sensitive.
BEGIN, END, FS, OFS, RS, ORS, NR, etc., must be in
upper case.
 
Anyway, as there is no exit instruction, the awk program try to read the standard input.

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
> Anyway, as there is no exit instruction, the awk program try to read the standard input.
Just tried it with GNU AWK.

If you only have a BEGIN (and no END or patterns), then it just runs the BEGIN section and exits without reading.



--
 
Salem, you're absolutely right. Seems that nawk exhibit the same behavior. Enjoy my pink consideration.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top