Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

bash script to checker credentials

echo -e "Enter username: c"
read -r userlis

echo -e "Enter passphrase: c"
read -r -s passlis

if [[ $userlis = "test" && $passlis = "123" ]] ; then
        echo "logged in."
elif [[ $userlis = "test" && $passlis != "123" ]] ; then
        echo "username is fine. Wrong passphrase"
elif [[ $userlis != "test" && $passlis = "123" ]] ; then
        echo "username is wrong. Passphrase is fine."
else
        echo "You dont belong here."
fi
Comment

PREVIOUS NEXT
Code Example
Shell :: Check servers availability using bash script 
Shell :: Calculate float values with menu using bash script 
Shell :: shows current time (12hrs), date, month by instance 
Shell :: linux between subshell variables 
Shell :: How to compress and decompress a file in the terminal 
Shell :: disable logging in linux 
Shell :: sanity coding with basir 
Shell :: .htaccess when deploying 
Shell :: separate a line using sed 
Shell :: from .vendor.pip_shims.shims import InstallCommand 
Shell :: mnet - git config user 
Shell :: add folder on terminal 
Shell :: search css class in all html files 
Shell :: git add symlink alias link file folder 
Shell :: KDE Connect Command PC turn off 
Shell :: The zip extension must be loaded 
Shell :: digi4school downloader 
Shell :: shell using Loops to Add Element in XML File in Powershell 
Shell :: fix low battery life windows 
Shell :: how to hide gitignore file 
Shell :: smbclient 
Shell :: tomcat monit 
Shell :: capitalize first letter in bash 
Shell :: installing through requiirements file 
Shell :: how to set minimum char for variable in powershell from user input 
Shell :: how to close firebase emulator hosting 
Shell :: gigabyte b550M enable TPM 
Shell :: hide ssd icon in ubuntu 
Shell :: npm react js package for form factor responsive site development 
Shell :: git get directories of added files 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =