Mi Primer script en BASH

Pos me acabo de aventar mi primer script en bash, bueno ya me habia aventado unos de ejemplo, pero este script es nomas para hacerme la vida un poco mas "secillita!!" {estilo argentino }, resulta que normalmente todos los dias ke prendio mi laptop en mi casa por las noches hay veces que se me antoja ver unas peliculas, series o etc que previamente he bajado en la compu de mi hermano, asi que lo que solia hacer es aventarme un mount -t cifs, porque a veces los videos no funcionan muy bien desde smb: en totem y en vlan client ni sikiera puede ver los archivos que kieres abrir desde la red. 

Es es Script conciste en 3 partes

  1. Me Pregunta el password de Sudo echo Sudo Pass?
    read pass
  2. Me Elimina el Mount si previamente existia, el motivo de esto es porque habia veces que ponia a mi lap a dormir y cuando la prendia de nuevo el mount point aparecia con errores esto es obvio puesto el sistema habia perdido conexion con la red, la solucion era desmountarlo con umount, el parametro -l es para forzar el umount read pass
    echo $pass | sudo -S umount -l /mnt/e
  3. Monta el Folder Compartido y wala.  El parametro -o guest es para que el mount no te pregunte por un password.
    echo $pass | sudo -S mount -t cifs //chelelo/e /mnt/e -o guest

Aqui esta el script en su totalidad, espero a alguien le sirva de referencia.

#!/bin/bash

echo Sudo Pass?


read pass

echo $pass | sudo -S umount -l /mnt/e

echo $pass | sudo -S mount -t cifs //chelelo/e /mnt/e -o guest

echo $pass | sudo -S umount -l /mnt/chek

echo $pass | sudo -S mount -t cifs //chelelo/chek /mnt/chek -o guest

//chelelo/e     explicacion:  //chelelo=nombre del host donde se encuentra el folder compartido, /e= nombre del folder a compartir.

/mnt/e explicacion: el folder donde quieres montar el folder compartido. 

En totem y en vlan client ni sikiera puede ver los archivos que kieres abrir desde la red.
[ Reply ]

On the engineer side, script composing is a helpful second level aptitude however nobody will utilize you full-time to do it. In bigger shops many starting designers will be given scripting undertakings since they are typically undemanding it authorizes the season of experienced engineers to accomplish something more imperative.
[ Reply ]

On the master side, script, making is a helpful second level bowed, however nobody will utilize you full-time to do it. In more noteworthy shops, many starting designers will be given scripting tries since they are frequently undemanding it supports the time of experienced modelers to satisfy something more objective.
[ Reply ]

Well! You have written a fabulous post and want to say one thing about your post should apply language changer so that each one can read freely your post.
[ Reply ]

Figuring out how to compose scripts, coordinate performing artists, light scenes, utilize a camera and know when you have a decent take are quite recently the tip of the chunk of ice. When you have shot your first script and made a completed video, you will know much, considerably more about what you need to do and the amount more you have to learn.
[ Reply ]

Get movies in HD and watch anytime with showbox apk.
[ Reply ]

High quality video/movies is always a desire of each and every movies lover so if you want to high quality videos you want an app like Showbox which gives you a hassle free downloading of movies .
[ Reply ]

I was scrutinizing your article and contemplated whether you had considered making a computerized book regarding this matter. You"re making would offer it fast. You have a significant measure of forming capacity.
[ Reply ]

Download Mobile Pro Apk app for Android 4.4 and lower to get maximum success
[ Reply ]

Using the app gets you in complete control of the Android, and also enables usage of apps that work on rooted devices alone.
[ Reply ]

Previous page 1 2 3 4 ... 8 Next page
72 comments

Comments

4-1=? Please answer the question.
Comment XML feeds: RSS | Atom