(echo "abc";echo "def")|awk '/abc/{match($0,"b");print substr($0,1,2);} !/abc/{print}'