Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ```
- #!/bin/bash
- echo "Ejemplo de un script que ejecuta comandos"
- user=$(whoami)
- echo "soy $user"
- sleep 2
- path=`pwd`
- echo "estoy en $path"
- ```
- ```
- [operativos@localhost scripts]$ ./myscript
- bash: ./myscript: Permiso denegado
- [operativos@localhost scripts]$ sh myscript
- Ejemplo de un script que ejecuta comandos
- soy operativos
- estoy en /home/operativos/scripts
- [operativos@localhost scripts]$ ls -l
- total 4
- -rw-rw-r--. 1 operativos operativos 134 ago 23 08:32 myscript
- [operativos@localhost scripts]$ ls -l
- total 4
- -rwxrw-r--. 1 operativos operativos 134 ago 23 08:32 myscript
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement