Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
513 B
2
Indexable
Never
echo "Enter the password : "
read pass
len=${#pass}
if [ $len -ge 8 ];
then
	echo "$pass" | grep -q [A-Z]
	if [ $? -eq 0 ];
	then
		echo "$pass" | grep -q [a-z]
		if [ $? -eq 0 ];
		then
			echo "$pass" | grep -q [0-9]
			if [ $? -eq 0 ];
			then
				echo "$pass" | grep -q _
				if [ $? -eq 0 ];
				then
					echo "Strong Password"
				else
					echo "Weak password"
				fi
			else
				echo "Weak password"
			fi
		else
			echo "Weak password"
		fi
	else
		echo "Weak password"
	fi
else
	echo "Weak password"
fi
Leave a Comment