string_comparison.sh (280B)
1 #!/usr/bin/env bash 2 # File : string_comparison.sh 3 # Description: Example for comparing string argument 4 # Copyright 2022 Harvard University. All Rights Reserved. 5 6 if [ "$1" == 'Hello CS107/AC207!' ]; then 7 echo 'Success!' 8 else 9 echo 'Got unexpected string argument' 10 fi