![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
shell编程
银狐号
这个作者很懒,什么都没留下…
展开
-
shell脚本学习之01
Linux的Shell种类很多, Bourne Shell(/usr/bin/sh或/bin/sh)Bourne Again Shell(/bin/bash)#!/bin/sh #-n的目的是接着这一行输入,不开新行 echo -n "login:" #读取变量name的输入值 read name echo -n "password:" read passwd if [ $name = hah转载 2016-10-19 16:37:28 · 226 阅读 · 0 评论 -
shell脚本学习02
将文件的内容显示到终端上 #!/bin/bash while read line do echo $line done 使用了重定向,不理解while read line的作用 网上大神说while read line 是一次性将信息读入并赋值给line 重定向的文件如果为 .txt 有可能失败,如果这个txt文件是在windows下用dos格式保存的转载 2016-10-20 10:20:57 · 148 阅读 · 0 评论