写一个脚本 1.设定变量file的值为/etc/passwd 2.使用循环读取文件/etc/passwd的第2,4,6,10,13,15行,并显示其内容 3.把这些行保存至/tmp/mypasswd文件中
#!/bin/bash file=/etc/passwd for i in {2,4,6,10,13,15} do sed -n "${i}p" $file >> /tmp/mypasswd done
写一个脚本 1.设定变量file的值为/etc/passwd 2.使用循环读取文件/etc/passwd的第2,4,6,10,13,15行,并显示其内容 3.把这些行保存至/tmp/mypasswd文件中
#!/bin/bash file=/etc/passwd for i in {2,4,6,10,13,15} do sed -n "${i}p" $file >> /tmp/mypasswd done
上一篇:Linux学习之路
下一篇:shell1到100的和
最近做到的题的HouseofHusk以及LargebinAttack小结
自己收集的些网站
比较好的Java 网站
--
比较好的文章整理
1.Netty入门教
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M