help: for command

Saqib Shaikh ss at saqibshaikh.com
Sun Dec 23 16:39:57 EST 2001


hi,

please can someone help me with the for command.

let's take a really stupid but simple example where i wish to cat all the
files in a directory.  note that i don't ever do this this is just an
example of where the for command doesn't work for me:

for i in *.txt; cat "checked this file" >>i; done

in such an example i get a file called i that contains the same line lots of
times.
under dos the following would work:

for %1 in (*.txt) do type "checked this file" >>%1

so any tips where i'm going wrong under linux?

thanks, saqib





More information about the Speakup mailing list