

Prepara tus exámenes y mejora tus resultados gracias a la gran cantidad de recursos disponibles en Docsity
Gana puntos ayudando a otros estudiantes o consíguelos activando un Plan Premium
Esta página no es visible en la vista previa
¡No te pierdas las partes importantes!


#!/bin/bash clear
nl secuencia.txt > lista.txt opc=
while [ $opc != c ] do
echo QUE ACCION DESEA REALIZAR? echo a. Añadir un nombre echo b. Mostrar la lista de nombres echo c. Salir read opc
if [ $opc == a ] then echo Ingrese nombre para añadirlo a la lista read nombre echo $nombre >> secuencia.txt nl secuencia.txt > lista.txt echo NOMBRE AÑADIDO CON EXITO!!! echo Desea volver al menu principal? echo 1. SI echo 2. NO read opc
if [[ (($opc2 == 1)) ]] then opc= clear else clear echo HASTA LUEGO sleep 3 opc=c fi fi
if [ $opc == b ] then clear echo LISTA ORDENADA cat lista.txt echo Desea volver al menu principal? echo 1. SI echo 2. NO read opc
if [[ (($opc2 == 1)) ]] then opc= clear else clear
echo HASTA LUEGO sleep 3 opc=c fi fi
if [ $opc == c ] then clear echo HASTA LUEGO sleep 3 fi done clear #!/bin/bash rm -r /home/Organizados
mkdir /home/Organizados mkdir /home/Organizados/pdfs mkdir /home/Organizados/txts mkdir /home/Organizados/jpgs cd Documentos n= n2= n3= for i in $( ls ) do
if [ ${i: -3} == 'pdf' ] then
cp $i /home/Organizados/pdfs (( n++ )) fi
if [ ${i: -3} == 'jpg' ] then cp $i /home/Organizados/jpgs (( n2++ )) fi
if [ ${i: -3} == 'txt' ] then cp $i /home/Organizados/txts (( n3++ )) fi done #!/bin/bash clear echo "PML- QRS- LTR- FGP- OPR-123" > leer.txt cat leer.txt