On Tue, 5 Feb 2002 13:18:18 -0300 (PYST) Raúl Gutiérrez Segalés <rau@campoalto.edu.py> wrote:
How can I make lots(for example 5) of copies of a file.. (from the command line, not writing a script).
I tried this but it didnt work..:
$ for f in "file[1-5]" ; do `cp file $f` ; done
and it made a copy called file[1-5] :-(
Any pointers??
Well 1 pointer is that you cannot have more than 1 file of the same name in any directory, that includes the directory name. So your loop must change the names to add an unique identifier, like x1,x2,x3,x4,x5 etc. So you can do: for f in 1 2 3 4 5; do `cp my.txt my.txt.$f`; done; -- $|=1;while(1){print pack("h*",'75861647f302d4560275f6272797f3');sleep(1); for(1..16){for(8,32,8,7){print chr($_);}select(undef,undef,undef,.05);}}