I am trying to copy a bunch of drawings on a client's machine,
starting in a particular directory, so I started by making a list of
all the files with the following command:
find ./ -iname "*.dwg" -print > /tmp/filelist1
Then I edited the file, removing lines of files that I didn't need to
copy, and saved it as, say, /tmp/filelist2. I made sure the file
worked by typing cat /tmp/filelist2, and then I made a directory to
put the copied drawings into: mkdir /home/dwg
Now I want to read through the lines of files in "filelist2" and copy
the files into the new directory. The best I can come up with is
cat /tmp/filelist2 -exec cp '{}' /home/dwg ';'
but I get a switch error for the cat command. I'm looking for a
command line solution, but I think this may require a shell script,
but I'm at a loss on where to start to get that working. I'm not
worried about the files having duplicate names, but I suppose a
solution that takes that into account couldn't hurt.
I don't have access to the machine right now, and I forgot to write
down the specific error (I know, but I was in a rush). I'm not looking
for a perl or awk solution, because I don't know if the client has
those packages installed, and it's a stand-alone machine, so kinda
handcuffed there. Any ideas?
-nj462SUT
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Linux Users Group.
To post a message, send email to [email protected]
To unsubscribe, send email to [EMAIL PROTECTED]
For more options, visit our group at
http://groups.google.com/group/linuxusersgroup
-~----------~----~----~----~------~----~------~--~---