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

NAWK script

Status
Not open for further replies.

sethu

Programmer
Apr 15, 2000
29
US
Hi,

My NAWK script is giving me an error. In my script there is a line like this

"basename " filename | getline base

I am getting an error like this

nawk: basename "/u01/metar/people/data/Source/test.mst" makes too many open files

Can anybody help me?

Sethu
 
Hi Sethu!

You can only have a limited number of pipes and files opened at the same time. I think that the limit is 20 in nawk. To avoid this error, you have to close the pipes with the close() command once you're done with them:

"basename " filename | getline base
close ("basename")

I hope it helped...

/Tobbe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top