12.05.2015 Views

Documentación

Documentación

Documentación

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Tipos de datos y operadores<br />

• Operadores<br />

• Chequeo de ficheros:<br />

– Existen múltiples operadores de ficheros que permiten chequear<br />

ciertas condiciones de los ficheros:<br />

» Existencia y tamaño: -e, -z, -s<br />

» Permisos: -r, -w, -x, -R, -W, -X<br />

» Tipo: -f, -d, -l, -S, -p, -T, -B<br />

» Otros: -M, -A<br />

If (-e $nombre_fichero)<br />

{<br />

print “El fichero $nombre_fichero existe. \n”;<br />

}<br />

» -e Chequea si el fichero existe<br />

» -z Chequea si el fichero tiene tamaño 0<br />

» -s Chequea si el fichero no tiene tamaño 0, y devuelve el tamaño.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!