This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

cp: omitting directory, for copying only files, sed


I have a script:

#!/bin/bash
W="\/cygdrive\/c\/Users\/dbj\/workspace\/$1\/."
echo $W
sed -n 's/^File[ ]*\([^ ][^ ]*\).*/\"\1\" '"$W"'/p' < $2 | xargs cp

Then I do

$ ./cptest1.sh test list.txt
\/cygdrive\/c\/Users\/dbj\/workspace\/test\/.
cp: omitting directory `/cygdrive/c/Users/dbj/workspace/test/.'

Why do I get "cp: omitting directory"?

The content of list.txt is

$ cat list.txt
list of file
File ..\test\file1.txt
File ..\test\file2.txt
end


-- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]