![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| shell script to search content of file with timestamps in the directory | psychobeauty | Shell Programming and Scripting | 10 | 04-21-2008 02:37 AM |
| Shell script for text extraction from a file | vignesh53 | Shell Programming and Scripting | 3 | 02-05-2008 04:16 AM |
| search for the contents in many file and print that file using shell script | cdfd123 | Shell Programming and Scripting | 3 | 10-07-2007 07:17 PM |
| Shell script to return all the ID's from file based on the distribution ID search | kumbhatalok | UNIX for Dummies Questions & Answers | 1 | 10-06-2006 09:53 AM |
| Korn Shell Script - Read File & Search On Values | run_unx_novice | Shell Programming and Scripting | 2 | 06-15-2005 04:20 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
Compete noob question....
I need a script to search through a directory and find files containing text string abcde1234 for example and then copy that file with that text string to another directory help please |
| Forum Sponsor | ||
|
|
|
|||
|
Thanks, have knocked this script up, what do you think
Code:
#!/bin/bash files="$(find /opt/efx/ian/original | xargs grep abcdef123 | cut -d ":" -f1 | uniq)" echo $files for X in $files do cp $X /opt/efx/ian/copied done Last edited by Yogesh Sawant; 04-20-2008 at 09:50 PM. Reason: added code tags |