![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
shell
菜鸟柱子
编程小菜
展开
-
运行shell脚本,出现了 $‘\\r‘: command not found
运行编写的shell脚本时,出现了$'\\r': command not found这样的错误提示。报错的原因是我们在windows系统操作时,编辑器里的换行符是\r\n ,而Linux上为\n,两个系统之间有差异导致的。处理办法有2种:1、vi 命令进入要编辑的文件,按ESC键进入命令模式,执行以下命令,按回车键,然后保存退出文件。: set ff=unix2、第二种yum -y install dos2unixdos2nuix install.sh上面的inst..原创 2021-01-21 14:27:05 · 684 阅读 · 0 评论 -
shell脚本入门1
新建touch first.sh编辑vim first.sh#!bin/bash# this is my first shell!echo "Please enter your name?"read NAMEecho "hello,$NAME"echo "Please enter your age?"read AGEecho "your age is $AGE"保...原创 2019-04-16 10:57:06 · 106 阅读 · 0 评论