stevebarnes
05-11-2001, 05:38 PM
Hi
I am still in the learing process here so please excuse me if this sounds confusing
I have created a shell script to install scripts automatically. Every thing seems to loads fine but i have one small problem.
I am using SED to convert variables through the scripts to the path is correct for each installation but i can only get one set of varibales to change and the other set wil not work.
Can anyone tell me if i need to specify to redo the file using SED
Here is the two lines i am creating at the mo
sed "s/\HostConfigUser/$username/g" /home/admin/www/scripts/links/cgi-bin/links/links.pl > /home/$username/www/cgi-bin/links/links.pl
sed "s/\DomainNameUrl/$domain/g" /home/admin/www/scripts/links/cgi-bin/links/links.pl > /home/$username/www/cgi-bin/links/links.pl
If i Place the two lines together then only one works i cannot get SED to write the file twice
Told you it would be confusing
Thanks if you can help
Steve
I am still in the learing process here so please excuse me if this sounds confusing
I have created a shell script to install scripts automatically. Every thing seems to loads fine but i have one small problem.
I am using SED to convert variables through the scripts to the path is correct for each installation but i can only get one set of varibales to change and the other set wil not work.
Can anyone tell me if i need to specify to redo the file using SED
Here is the two lines i am creating at the mo
sed "s/\HostConfigUser/$username/g" /home/admin/www/scripts/links/cgi-bin/links/links.pl > /home/$username/www/cgi-bin/links/links.pl
sed "s/\DomainNameUrl/$domain/g" /home/admin/www/scripts/links/cgi-bin/links/links.pl > /home/$username/www/cgi-bin/links/links.pl
If i Place the two lines together then only one works i cannot get SED to write the file twice
Told you it would be confusing
Thanks if you can help
Steve
