From: Petr M. <mi...@ph...> - 2010-07-20 15:42:05
|
> Personally - on Windows - I use an ("ultra-easy") bksl2sl.exe utility, which > reads stdin, each occurance of "\" replaces by "/" and writes bytes to > stdout. It works, although its "non-standard". Then it's exactly what the standard tr or sed can do. > > c=system(b) > ... OK, I treat it as a possibility which works on Linux; it doesn't work on > Windows. It does; however, you have to run pipe-enabled gnuplot, i.e. gnuplot.exe or wgnuplot_pipes.exe (see README.Windows). > IMHO, I don't think it's the way of best performance - to create new > process, wait for the pipe until it is broken and the take the result. When > converting a large number of files, a built-in replacing function should be > much quicker, don't you think? You can read all of them at once; and then use words() and word() functions to step through the file list, e.g. if (!exist('a')) a=system('dir *.dat | bksl2sl'); n=words(a); k=1 plot word(a,k) pause 2 k=k+1 if (k<=n) reread --- PM |