You've already forked scripts-random
Update some scripts
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user