help: for command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux for the Blind]     [Fedora Discussioin]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]
  Powered by Linux