Linux bash shell script prompt user input and store in variable

This question already has an answer here:

  • Bash script always prints “Command Not Found” 15 answers

  • Looks like you may have carriage return / windows line terminations, try to run

    dos2unix input.txt
    

    or

    sed 's/^M$//' input.txt > output.txt
    

    or

    tr -d 'r' < input.txt > output.txt
    
    链接地址: http://www.djcxy.com/p/25552.html

    上一篇: 我如何创建一个带有多选菜单变量的shell脚本?

    下一篇: Linux bash shell脚本提示用户输入并存储在变量中