“Porównaj Strings Shell” Kod odpowiedzi

Porównaj Strings Shell

#!/bin/bash

VAR1="Linuxize"
VAR2="Linuxize"

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

Porównaj 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
Abs Zarzis

Odpowiedzi podobne do “Porównaj Strings Shell”

Pytania podobne do “Porównaj Strings Shell”

Więcej pokrewnych odpowiedzi na “Porównaj Strings Shell” w Shell/Bash

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu