|
From: | david kerns |
Subject: | Re: [bug-gawk] Gawk feature request - file list |
Date: | Wed, 1 Feb 2017 08:08:10 -0700 |
Hi.
Thank you for your note.
This doesn't require a new option; it can be done easily in awk code.
Daniele Zanoli <address@hidden> wrote:
> Hello,
> I'm an enthusiast user of gawk. I hope this is the best address to place a
> feature request (I could not find an "official" place for requests)
>
> Often I have to use gawk on a large number of files with a single execution of
> gawk (I have to compare some file contents) but it is very easy to reach the
> maximum length of the shell command line, since files are in different paths
>
> So I think it would be useful (not only for me) a new command line switch to
> specify a file that contains the names of the files to process (e.g.
> gawk .. -list myfilelist.txt ...)
>
> Best regards,
>
> --
> Daniele
Something like the following (untested, but you'll get the idea):
BEGIN {
filelist = ARGV[1]
ARGC--
for (i = 1; (getline filename < filelist) > 0; i++) {
ARGV[i] = filename
ARGC++
}
}
should do the trick.
Hope this helps,
Arnold
[Prev in Thread] | Current Thread | [Next in Thread] |