EmbLogic's Blog

todays work

program of scripting (password entry)
pswrd=secret

count=0

while (:)

do

while ($count!=3)

do

echo Enter Password

read pss

if [$pss!=$pswrd]

then

echo incorrect password try again

else

echo welcome

fi

`expr $count + 1`

done

echo want to change the password press y or n

read change

case $change in

yes|y|YES|Yes )

echo “Enter New Password”

read pswrd;;

[nN]* )

echo as you wish ;;

* ) echo “wrong choice”;;

esac

echo want to exit press y or n

read terminate

case $terminate in

yes|Y|y|YES )

echo BYE

exit 0;;

[nN]* )

echo welcome again;;

* ) echo wrong choice;;

esac

done

exit 0

………………..
error in first nested loop  ??????????

 

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>