linux sed、grep、egrep、find常见实践案例
文章目录sed练习先猜后看grep练习先做后看egrep练习先做后看
sed练习
先猜后看
cat -n /etc/passed | sed '2,5d' # 将2~5行删除后显示
cat -n /etc/passwd | sed '2a Hello Friends' # 在第2行后面一行加上"hello friends"字符串
cat -n /etc/passwd | sed '2,4c 自律者自由' # 将第2~5行内容替换成指定串
cat -n /etc/passwd | sed
原创
2020-06-16 20:46:48 ·
283 阅读 ·
0 评论