Path: csiph.com!weretis.net!feeder4.news.weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Karl Ratzsch Newsgroups: comp.graphics.apps.gnuplot Subject: Re: Plot datafiles in bulk Date: Wed, 8 Jun 2016 10:34:16 +0200 Organization: solani.org Lines: 32 Message-ID: References: <1e061eba-f693-4eee-9f63-ce7809dc5f91@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Trace: solani.org 1465374858 20049 eJwNysERACEIA8CWQE0YyxEC/Zdwt+/FprPiEDwYjNubiatUD+xFU2ZlKmrt1Z7o8sor5P03PjrPEhI= (8 Jun 2016 08:34:18 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Wed, 8 Jun 2016 08:34:18 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 X-User-ID: eJwFwYEBgDAIA7CXxqBFzhGk/59gAqdxMggGBGm3UXvm7XIX7KliZhx9d8gwIAts+mri1g8ioRDE In-Reply-To: Cancel-Lock: sha1:1kEowwWaFgLthWKu7HYBWELVqbY= X-NNTP-Posting-Host: eJwFwYEBwCAIA7CXRFoY50gd/59gQg8LJYIBDgc/+iSylFblw9YNN0uKe+nyw7SfWbbV2HwVmhDM Xref: csiph.com comp.graphics.apps.gnuplot:3336 Am 08.06.2016 um 06:49 schrieb Ethan A Merritt: > Karl Ratzsch wrote: >> Am 07.06.2016 um 21:22 schrieb explorat123@gmail.com: >>> I'd like to plot multiple .csv files in bulk, regardless of their >>> names: 20151221-Log.csv >>> 20160315-Log.csv >>> 20160601-Log.csv >>> ... >>> Is there an easy way to do this without having to specify the name >>> for each individual file and without having to join the files ? >> >> "plot" obviously does not support wild cards, but something like >> >> fnlist = system("ls *.csv") >> n = words(fnlist) >> fname = word(fnlist,i) >> plot for [i=1:n] fname(i) using .... >> >> could work. > > Or > fnlist = system("ls -1 *.csv") > plot for [FILE in fnlist] FILE I keep forgetting that "for" can directly iterate through a list of words. Thanks! Also works on MS windows, btw., the corresponding command is "dir /B *.cvs".