[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gawk] Gawk feature request - file list

From: Daniele Zanoli
Subject: Re: [bug-gawk] Gawk feature request - file list
Date: Fri, 3 Feb 2017 09:06:37 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0

super good trick!
but this would require to use it in all my scripts... and it looks like a little bit too "tricky"
maybe a "public" option would be cleaner to be handled

Unfortunately I'm often using a Windows port of Gawk (I have to run it on several PCs of my colleagues) and the windows shell command line is only 32k characters (or bytes?) long...

I have built a kind of "IDE" which launches awk scripts over files in order to make it simple to use also for non tech people but currently I am limited on the max number of files I can handle.

thanks anyway!


Original Message  --------
Subject: Re: [bug-gawk] Gawk feature request - file list
From: address@hidden
To: address@hidden, address@hidden
Date: 1/2/2017, 15:57:18


Thank you for your note.

Daniele Zanoli <address@hidden> wrote:

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,


This doesn't require a new option; it can be done easily in awk code.
Something like the following (untested, but you'll get the idea):

        BEGIN {
                filelist = ARGV[1]
                for (i = 1; (getline filename < filelist) > 0; i++) {
                        ARGV[i] = filename

should do the trick.

Hope this helps,



reply via email to

[Prev in Thread] Current Thread [Next in Thread]