📜  读取文件和 while 循环示例 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:49:58.737000             🧑  作者: Mango

代码示例1
#!/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