Answers for "bash compare two strings"

9

bash scripting string comparison

#!/bin/bash

VAR1="Linuxize"
VAR2="Linuxize"

if [ "$VAR1" = "$VAR2" ]; then
    echo "Strings are equal."
else
    echo "Strings are not equal."
fi
Posted by: Guest on March-11-2020

Code answers related to "bash compare two strings"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language