MaRiOsGR
asked on
Small shell script (read domains names from a text file and push them into command via a variable)
its like this i have a txt file with domains sorted like this :
mydomain1.com
mydomain2.com
mydomain3.com
they are almost 500 domains.
I want to run a command for each domain something like du -sh /mydomains/mydomain1.com/l ogfolder/
so I guess it has to be something like that du -sh /mydomains/$domains/logfol der/
how can I make the script read all the domains from the list, and each time replace the variable $domains and run the command till the list is over?
mydomain1.com
mydomain2.com
mydomain3.com
they are almost 500 domains.
I want to run a command for each domain something like du -sh /mydomains/mydomain1.com/l
so I guess it has to be something like that du -sh /mydomains/$domains/logfol
how can I make the script read all the domains from the list, and each time replace the variable $domains and run the command till the list is over?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
no worries, glad to have helped
ASKER