read -p "Enter name : " username echo $username for usuario in `cat /etc/passwd | cut -d ":" -f1 | grep "pepito"` do numero=`echo $usuario | wc -c ` echo $numero -1 | bc done
Ejercicios de Bash: contar el número de letras que tiene un nombre de usuario que indica él mismo (utilizando grep) en el fichero /etc/passwd (Bash)
Except where otherwise noted, Jesusninoc by Jesús N. is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.