Đang Thực Hiện

121132 simple shell script

Hi there, I am looking for a shell script to be run in linux as root.

this script will include a comma seperated "db" of usernames such as domaina, domainb, domainc etc.

then it will perform a recursive copy from one place to /home/$username/public_html/

sample:

cp -rfp --reply=yes /home/infoln/www/source/* /home/$username/public_html/

then chown that usernames public_html/

sample:

chown -Rf $username:$username /home/$username/public_html/

then repeat until all the names in the db are done.

--------------------

actual code will be:

$username="sitea,siteb,site10,mysite,yoursite"

cp -rfp --reply=yes /extra/source/* /home/$username/public_html/

chown -Rf $username:$username/home/$username/public_html/

rinse wash and repeat! :)

The code is right there for you - I just need the forenext loop to be added with the db, should be fairly simple to do.

Kỹ năng: Bất kì công việc gì, Lập trình C, Perl, Python

Xem thêm: recursive programming, programming loop, loop programming, linux shell programming, for loop in c programming, for loop c programming, c programming for loop, in linux shell script, shell script, recursive, linux simple loop script, simple perl shell, run script linux, loop script linux, shell script perl, perl script shell script, linux need root, chown, perl code sample, simple loop linux script, run script loop linux, fairly simple, source code shell, shell linux source code, simple linux script loop

Về Bên Thuê:
( 12 nhận xét )

Mã Dự Án: #1867298

Đã trao cho:

perlgurusl

I can have this bash script written in a few hours.

$20 USD trong 0 ngày
(0 Đánh Giá)
0.0