I have thousands of directories, all of them has this format;
/var/www/vhosts/[USERNAME].company.com/conf/
and i have a file called x.txt, it's content should have
[USERNAME] and some static text...
so when i do dir /var/www/vhosts/*/conf/ , I am getting all the directories that I need to copy the file under, however, I don't know how to grab that [USERNAME] and put it in that file that i need to copy.
All suggestions welcome. I can only use shell scripting on this environment.
Thanks,