Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #Description: Copia un fichero a un directorio si tenemos permiso de lectura/Escritura respectivamente
- #Author:jMa
- if [ \( $# != 2 \) ] || [ \( ! -r $1 \) ] || [ \( ! -d $2 \) ] || [ \( ! -w $2 \) ]
- then
- echo "Error: Haz la llamada con dos argumentos (fichero y directorio) y asegurate que tienes permiso de lectura/escritura respectivamente"
- exit 1
- else
- cp $1 $2;cd $2;chmod 110 $1;echo "Instalación completa"
- exit 0
- fi
Advertisement
Add Comment
Please, Sign In to add comment