1 |
-----BEGIN PGP SIGNED MESSAGE----- |
2 |
Hash: SHA1 |
3 |
|
4 |
El Vie 28 Feb 2003 16:02, Cesar Bermudez escribió: |
5 |
|
6 |
| Hola, a ver si los alguien me puede dar una mano |
7 |
A ver si esto te la da: |
8 |
|
9 |
Asumiendo que el index.php esta en $HOME/www: |
10 |
|
11 |
#!/bin/bash |
12 |
ORIGEN="/etc/templates/index.php" |
13 |
UBICACION="www" |
14 |
ARCHIVO="index.php" |
15 |
|
16 |
for DIR in $(find /home -mindepth 1 -maxdepth 1 -type d -print); do |
17 |
if [ -x $DIR/$UBICACION/$ARCHIVO ]; then |
18 |
--- esta el archivo -- |
19 |
else |
20 |
--- noesta y hay que crearlo/copiarlo |
21 |
mkdir -p $DIR/$UBICACION |
22 |
cp $ORIGEN $DIR/$UBICACION/$ARCHIVO |
23 |
fi |
24 |
done |
25 |
exit 0 |
26 |
|
27 |
Espero que te sirva |
28 |
|
29 |
- -- |
30 |
..:: Gent00 :.:. |
31 |
...: gentoo@×××××××××××××××.ar .:.. |
32 |
::.. Fingerprint: F86A AF36 4B75 6CD0 FFBB A800 8C86 CCA9 ..:. |
33 |
.::. Powered By Gentoo Linux .:.. |
34 |
|
35 |
BOFH Excuse #309: firewall needs cooling |
36 |
-----BEGIN PGP SIGNATURE----- |
37 |
Version: GnuPG v1.2.1 (GNU/Linux) |
38 |
|
39 |
iD8DBQE+X/RqjIbMqXs4fYIRAh56AJwMZwZIPWYUivt8ky3SIRAKJdyxGACfesYf |
40 |
oLRKLGZPBL2/6NCpgCz8CZA= |
41 |
=2LjX |
42 |
-----END PGP SIGNATURE----- |
43 |
|
44 |
|
45 |
-- |
46 |
gentoo-user-es@g.o mailing list |