Update some scripts

This commit is contained in:
2024-02-24 00:21:04 +01:00
parent 3cd7b9bfaf
commit 1d62cd3a86
6 changed files with 92 additions and 72 deletions

View File

@@ -1,15 +1,15 @@
#! /bin/bash
#!/bin/bash
# Colores
BLUE="\033[34m"
RED="\033[31m"
NOCOLOR="\033[0m"
# Control de salida con Ctrl + C
function ctrl_c() {
echo -e "${RED}\n\n[!] Saliendo... \n${NOCOLOR}"
tput cnorm; exit 1
echo -e "${RED}\n\n[!] Saliendo... \n${NOCOLOR}"
tput cnorm
exit 1
}
# Ctrl+C
@@ -19,7 +19,6 @@ trap ctrl_c SIGINT
for fichero in $(ls); do
if [[ -f "$fichero" ]]; then
cuenta=$(cat "$fichero" | wc -l)
echo -e "El fichero ${BLUE}$fichero ${NOCOLOR}tiene ${RED}$cuenta ${NOCOLOR}lineas"
fi
echo -e "El fichero ${BLUE}$fichero ${NOCOLOR}tiene ${RED}$cuenta ${NOCOLOR}lineas"
fi
done