cs107-lecture-examples

Example codes used during Harvard CS107 lectures
git clone https://git.0xfab.ch/cs107-lecture-examples.git
Log | Files | Refs | README | LICENSE

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