1 2 3 4 5 6 7 8 9 10 11 12 13
if [[ ! "$(php polyglot.txt)" = '#php' ]]; then echo php >&2 exit 1 fi if [[ ! "$(ruby polyglot.txt)" = '#ruby' ]]; then echo ruby >&2 exit 1 fi if [[ ! "$(perl polyglot.txt)" = '#perl' ]]; then echo perl >&2 exit 1 fi echo okay