[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] how to close pipe?
From: |
Davide Brini |
Subject: |
Re: [bug-gawk] how to close pipe? |
Date: |
Sat, 15 Nov 2014 23:48:04 +0100 |
(sorry for the top posting)
cmd = "grep \"" $1 "\" fn.txt"; cmd | getline var; close(cmd)
But that's really just about the most terrible way of doing whatever you're trying to there (and you're still missing posssible multi-line output from grep). It's very likely that the whole task is solvable entirely with awk alone.
frank ernest <address@hidden> wrote:
gawk '{ "grep -E \"" $1 "\" fn.txt" | getline var; print var }'
After a while I get a too many files open message, how do I close the pipes?