Hi,
I have to append the content of the file myfil.txt to each *.scr file found in every sub-folder under the main directory "maindir"
Each *.scr file has a unique name. Someone in the forum suggested the following command:
find maindir -name *.scr -exec cat /path/to/myfil.txt >> {} \;
But, what this command does is, it writes out the content of myfil.txt to a file by name "{}", therefore, I can't use it.
Can somebody please help me how this can be done.
My directory-tree is as follows:
MAIN DIRECTORY
|
|
|----|-------|---|---|---|
| | | |
sub1 sub2 sub3 .......subn
| | | |
| xyz.scr | |
abc.scr cbc.scr wxy.scr
Thanks, Thanks in advance!
RV
I have to append the content of the file myfil.txt to each *.scr file found in every sub-folder under the main directory "maindir"
Each *.scr file has a unique name. Someone in the forum suggested the following command:
find maindir -name *.scr -exec cat /path/to/myfil.txt >> {} \;
But, what this command does is, it writes out the content of myfil.txt to a file by name "{}", therefore, I can't use it.
Can somebody please help me how this can be done.
My directory-tree is as follows:
MAIN DIRECTORY
|
|
|----|-------|---|---|---|
| | | |
sub1 sub2 sub3 .......subn
| | | |
| xyz.scr | |
abc.scr cbc.scr wxy.scr
Thanks, Thanks in advance!
RV