Horje
compare strings shell Code Example
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
Source: linuxize.com
compare strings shell
#!/bin/bash

VAR1="Linuxize"
VAR2="Linuxize"

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




Shell

Related
list of files in git commit Code Example list of files in git commit Code Example
how to see commited file names in command line git Code Example how to see commited file names in command line git Code Example
git check which files are committed Code Example git check which files are committed Code Example
recursively remove files with extension linux Code Example recursively remove files with extension linux Code Example
installing react router dom with yarn Code Example installing react router dom with yarn Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
14