如何用awk查找字符“,,”所在行


(64,937,1928349407,1318499455),(64,937,2099319293,1318499472),(64,937,2099318515,1318499491),(64,937,2099319712,1318499510),(64,937,2071180655,1318499540), (64,,2071179473,1318499558), (64,937,2099320623,1318499575)
找到含有,,这样的行。

Linux awk shell

Chronos 12 years, 2 months ago

awk -vRS=")," 'BEGIN{FS=")"}/,,/{print $1FS}'
修改下`这样就不会匹配到最后一个,多一个括号了

omni2z answered 12 years, 2 months ago

Your Answer