Answers for "read file and while loop example"

0

read file and while loop example

#!/bin/sh
while read input_text
do
  case $input_text in
        hello)          echo English    ;;
        howdy)          echo American   ;;
        gday)           echo Australian ;;
        bonjour)        echo French     ;;
        "guten tag")    echo German     ;;
        *)              echo Unknown Language: $input_text
                ;;
   esac
done < myfile.txt
Posted by: Guest on May-08-2021

Code answers related to "read file and while loop example"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language