1
0
mirror of https://github.com/stefanocasazza/ULib.git synced 2025-09-28 19:05:55 +08:00
ULib/tests/examples/wi-auth/bin/check_passwd.sh
2015-01-23 17:24:36 +01:00

18 lines
354 B
Bash
Executable File

#/bin/bash
# check_passwd.sh
# egrep "[ABCDEFGHIJKLMNOPQRSTUVXYZ]" | \
b=`echo $1 | egrep "^.{8,255}" | \
egrep "[abcdefghijklmnopqrstuvxyz"] | \
egrep "[0-9]"`
#if the result string is empty, one of the conditions has failed
if [ -z $b ]
then
echo "Conditions do not match"
else
echo "Conditions match"
fi