Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. ```
  2. #!/bin/bash
  3. echo "Ejemplo de un script que ejecuta comandos"
  4. user=$(whoami)
  5. echo "soy $user"
  6. sleep 2
  7. path=`pwd`
  8. echo "estoy en $path"
  9. ```
  10.  
  11. ```
  12. [operativos@localhost scripts]$ ./myscript
  13. bash: ./myscript: Permiso denegado
  14. [operativos@localhost scripts]$ sh myscript
  15. Ejemplo de un script que ejecuta comandos
  16. soy operativos
  17. estoy en /home/operativos/scripts
  18. [operativos@localhost scripts]$ ls -l
  19. total 4
  20. -rw-rw-r--. 1 operativos operativos 134 ago 23 08:32 myscript
  21. [operativos@localhost scripts]$ ls -l
  22. total 4
  23. -rwxrw-r--. 1 operativos operativos 134 ago 23 08:32 myscript
  24. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement