LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:43 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration