On Tue, Feb 12, 2013 at 04:20:53AM -0800, laurent.tes...@gmail.com wrote:
> > liste=`ls *.T02`

This is broken because filenames may contain spaces, newlines, etc.
Use an array instead:

liste=(*.T02)

See http://mywiki.wooledge.org/BashPitfalls for an explanation of some
of the issues.

This type of question is more appropriate for the help-bash mailing list,
by the way.

> 1> teqc.exe `ls *.T02` > out.T02
> 2> teqc.exe  $liste    > out.T02
> 3> teqc.exe "$liste"   > out.T02

All of those are wrong, each in its own way.

> What is the proper way of doing this ?

Well, the easiest way would be:

teqc.exe *.T02 > out.T02

If you insist on storing the filenames in advance for some reason, use
an array:

files=(*.T02)
teqc.exe "${files[@]}" > out.T02

If you run into command line length issues, then you may have to process
the array in several chunks.  See http://mywiki.wooledge.org/BashFAQ/095
for examples of that.

Reply via email to