99问答网
所有问题
如何用shell提取文件中指定的字符串
如题所述
举报该问题
推荐答案 2017-04-24
##测试文件
cat 1234.txt
sdas
asdasdfa
sdfsf
asfsdfdfg
dfgdf
dfhf
asdasd
dfgdf
##执行脚本,在1234.txt中找字符串"fh"所在行
#!/bin/bash
sed -n '/fh/p' 1234.txt
##执行结果
dfhf
温馨提示:答案为网友推荐,仅供参考
当前网址:
http://99.wendadaohang.com/zd/jvzjOztWzBXzWjW7Wj.html
相似回答
大家正在搜
相关问题
如何用shell提取文件中指定的字符串
如何用shell提取文件中指定的字符串
如何用shell提取文件中指定的字符串
如何用shell提取文件中指定的字符串
如何用shell提取文件中指定的字符串
怎样用shell编程实现在文件中提取指定字段的值
如何用shell提取文件中指定的字符串
如何用shell提取文件中指定的字符串