Answers for "bash string match if"

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
0

bash string match if

#!/bin/bash
# your code goes here
echo "if double helix, type - dh " 
echo "single strand, type - ss"
read htype # this is catching input
echo Structure is $htype ;


if [[ $htype == dh ]];
then
     echo "##dublex#####"
else
    echo "#####single#####"
fi
Posted by: Guest on August-19-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language