Chinaunix
标题:
请教shell读文件的问题
[打印本页]
作者:
yellowweng
时间:
2008-08-29 10:39
标题:
请教shell读文件的问题
我的文件里面有这么一句话
Version: 2.0.0.020
我想通过shell把版本号读取出来,怎么用grep和sed
作者:
ly5066113
时间:
2008-08-29 10:42
awk '/^Version/{print $2}'
作者:
superline007
时间:
2008-08-29 10:55
sed -n '/^Version/ s/Version: *//pg'
欢迎光临 Chinaunix (http://bbs.chinaunix.net/)
Powered by Discuz! X3.2