sed表达式使用一
时间:2006-03-17 来源:Alan_Shu
sed匹配tab键:
sed -n 's/^.*SUIN: \+\([0-9]\+\)[[:space:]]DUIN: \+\([0-9]\+\).*$/\1 \2/p' file.log
sed模式匹配
sed -n 's/^.*SUIN: \+\([0-9]\+\).\+DUin: \+\([0-9]\+\).\+Info:\(.*$\)/\1 \2 \3/p' file.log
sed -n 's/^.*SUIN: \+\([0-9]\+\)[[:space:]]DUIN: \+\([0-9]\+\).*$/\1 \2/p' file.log
sed模式匹配
sed -n 's/^.*SUIN: \+\([0-9]\+\).\+DUin: \+\([0-9]\+\).\+Info:\(.*$\)/\1 \2 \3/p' file.log
相关阅读 更多 +