- Jan 21, 2005
- 17,722
- 6
- 81
I'm very new to UNIX scripts. I'm trying to write a script that looks for a string in a certain type of files, then copy those files to my home directory on the UNIX box.
Here is what I have so far, and it works as it should...
But how do I take the list of files it outputs, and copy them to my home directory? Would I need to do something like this?
Content restored by People for the Ethical Treatment of Search Engines.
Markbnj
Programming moderator
Here is what I have so far, and it works as it should...
Code:
find *.sas -exec grep -l "garmstrong" {} \;
But how do I take the list of files it outputs, and copy them to my home directory? Would I need to do something like this?
Code:
cp fileorig filedest
Content restored by People for the Ethical Treatment of Search Engines.
Markbnj
Programming moderator
Last edited by a moderator: