Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # creamos la función de menú
- menu() {
- clear
- echo "bienvenido a identifica.sh pulsa control+c para salir"
- echo "dime el nombre del archivo que quieres crear "
- read nom
- echo "dime que extensión tendrá el archivo "
- read ext
- sleep 1
- echo "ahora crearé el documento $nom con la extensión $ext "
- echo "este documento contrendrá tu identificación"
- echo "pulsa intro para continuar"
- read foo
- touch $nom.$ext
- echo "SI2A otecruchr Otero Cruz, Christopher `date '+%d-%B-%Y %T'`" >> $nom.$ext
- }
- ayuda() {
- echo "
- "
- echo "si quieres identificar un documento escribe su nombre y extensión, por ejemplo 'sh identifica.sh holamundo.txt'.
- nenú de creación -m
- identificar no identificados -a
- ayuda -h, --help"
- echo "
- "
- }
- lista(){
- grep -L
- case $1 in
- -m)
- menu
- ;;
- -h)
- ayuda
- ;;
- --help)
- ayuda
- ;;
- -a)
- ;;
- *)
- echo "SI2A otecruchr Otero Cruz, Christopher `date '+%d-%B-%Y %T'`" >> $1.bak
- cat $1 >> $1.bak
- rm $1
- mv $1.bak $1
- ;;
- esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement