Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Michael Okuntsov Newsgroups: comp.graphics.apps.gnuplot Subject: Re: for loop in awk script Date: Wed, 01 Apr 2015 14:16:09 +0600 Organization: A noiseless patient Spider Lines: 18 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Wed, 1 Apr 2015 08:15:18 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="4bdc563fb798510bd30a43bcf63082c9"; logging-data="15688"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+GoT5eV5/Al3LYxJ91QF1z" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 In-Reply-To: Cancel-Lock: sha1:uIn7uwIzSJyFXhoHsGhiTvsphXE= Xref: csiph.com comp.graphics.apps.gnuplot:2851 01.04.2015 07:07, naobi пишет: > Please help me in writing the script file if anyone is using awk script > > foreach n(1 2 3 4 5 6 7 8 9 10) > foreach seed(1 2 3 4 5 6 7 8 9 10) > statement 1 > statement 2 > end > end > > I want to make the seed iterate 1000 times...but it is not possible to write manually foreach seed(1 2 3 4 5 6 7 8 9 10 11 12 .........till 1000) > > i tried using awk 'BEGIN{for(i=0;i<1000;i++)}',,,,but it says unmatched found > > Thank You > https://www.gnu.org/software/gawk/manual/html_node/For-Statement.html