LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   cp files from grep results (https://www.linuxquestions.org/questions/linux-newbie-8/cp-files-from-grep-results-355903/)

Sigkill(9) 08-22-2005 03:00 PM

cp files from grep results
 
How can I use cp with the results from the following:

grep -E '[Ww][Oo][Rr][Dd]' MyFiles_tif/textversion/*

apeekaboo 08-22-2005 03:08 PM

Try something like
Code:

cp $(grep -El '[Ww][Oo][Rr][Dd]' MyFiles_tif/textversion/*) /destination/

Sigkill(9) 08-22-2005 03:17 PM

Worked perfectly.

Thank you.


All times are GMT -5. The time now is 02:49 AM.