Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

compare strings shell

#!/bin/bash

read -p "Enter first string: " VAR1
read -p "Enter second string: " VAR2

if [[ "$VAR1" == "$VAR2" ]]; then
    echo "Strings are equal."
else
    echo "Strings are not equal."
fi
Comment

bash compare two strings

if [ "$s1" == "$s2" ]
then
	stuff
fi
Comment

PREVIOUS NEXT
Code Example
Shell :: git pull from another user 
Shell :: how to start nessus on kali 
Shell :: zsh: command not found: julia 
Shell :: port already in use 8000 
Shell :: Exit bash script if not running as root 
Shell :: node install ubuntu 
Shell :: auto run command vim startup 
Shell :: vim move line down 
Shell :: bash return last n characters from every line 
Shell :: git revert last commit keep changes 
Shell :: bash wait for input to continue 
Shell :: how to install vim through powershell 
Shell :: find and delete files with extension linux 
Shell :: reset last commit 
Shell :: install tailwindcss nodejs 
Shell :: you have new mail terminal mac 
Shell :: etcher download ubuntu 18.04 
Shell :: install homebrew on mac 
Shell :: bash add new line to crontab 
Shell :: du linux several directories 
Shell :: linux install sass 
Shell :: install ssl ubuntu 
Shell :: install angular cli version 
Shell :: install i18next-browser-languagedetector 
Shell :: install aws cli on ubuntu 
Shell :: update git config username and email 
Shell :: bc sum command 
Shell :: git commit changes to different branch 
Shell :: install docker fedora 
Shell :: set zsh as default shell 
ADD CONTENT
Topic
Content
Source link
Name
4+4 =