LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 08-22-2005, 03:00 PM   #1
Sigkill(9)
Member
 
Registered: Jan 2005
Location: Dallas/TX
Distribution: OpenBSD/FreeBSD/Debian/Mac OS X
Posts: 40

Rep: Reputation: 15
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/*
 
Old 08-22-2005, 03:08 PM   #2
apeekaboo
Member
 
Registered: Apr 2003
Location: Stockholm/Sweden
Distribution: Kubuntu, Debian, Slax
Posts: 91

Rep: Reputation: 16
Try something like
Code:
cp $(grep -El '[Ww][Oo][Rr][Dd]' MyFiles_tif/textversion/*) /destination/
 
Old 08-22-2005, 03:17 PM   #3
Sigkill(9)
Member
 
Registered: Jan 2005
Location: Dallas/TX
Distribution: OpenBSD/FreeBSD/Debian/Mac OS X
Posts: 40

Original Poster
Rep: Reputation: 15
Worked perfectly.

Thank you.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
grep on Unicode files overbored Linux - Software 2 07-18-2004 01:12 PM
Using the results of locate for grep skibud2 Linux - Newbie 1 12-16-2003 01:58 PM
Please help - Unpridictable results from grep/ps to find pid nharnwal Solaris / OpenSolaris 1 12-10-2003 08:28 PM
Exporting MYSQL results into a external files saravanan1979 Linux - General 4 11-12-2003 03:19 PM
How to filter files in files and files which are in a sub-directory with "grep"? Piero Linux - Newbie 9 08-29-2003 02:38 AM


All times are GMT -5. The time now is 11:13 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration