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!

Having to press ENTER, then CTRL-D to get program to finish 1

Status
Not open for further replies.

okie23

Technical User
Apr 1, 2004
1
US
This program looks through a dir and shows what tyes they are and inserts the results into a file called "holdfile". The problem is in order to get the program to run I have to press ENTER twice and then CTRL-D for the command prompt to come up and program to finish. Any possible reason why?

nawk '
homed = home "/" user
{if (ctr<1){system("file dirs* ")}}
fi
++ctr
' $homed > holdfile

Thank you,
Keith
 
You are mixin shell and awk syntax in your awk program !
Why not just do this in shell ?
file dirs* >holdfile


Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top