红联Linux门户
Linux帮助

linux awk截取数据,如何根据第二部分数据的关键字‘aaaaa’获取整串数据

发布时间:2013-10-30 12:02:12来源:红联作者:qzq181490950
数据类似这样(‘dsfddfs’,'aaaaa','dsff',([\"dasds\":545,\"dfsd\":464,\"sdf\":([\"sda\":15,\"dsfs\":3421]),\"sd\":21]),(‘fsd’,'bbbb','dsff',([\"dasds\":5458,\"dfsd\":4564,\"sdf\":([\"sda\":15,\"dsfs\":3211]),\"sd\":241]),(‘fxcv’,'aaaaa','dsff',([\"dasds\":5495,\"dfsd\":42364,\"sdf\":([\"sda\":15,\"dsfs\":3221]),\"sd\":221]),(‘dfs’,'cccc','dsff',([\"dasds\":5745,\"dfsd\":4654,\"sdf\":([\"sda\":15,\"dsfs\":5321]),\"sd\":21]),(‘dsfd234dfs’,'cccc','dsff',([\"dasds\":52545,\"dfsd\":4264,\"sdf\":([\"sda\":155,\"dsfs\":321]),\"sd\":71]),(‘sscs’,'aaaaa','dsff',([\"dasds\":1545,\"dfsd\":4644,\"sdf\":([\"sda\":15,\"dsfs\":3221]),\"sd\":21]).....

希望获得结果为:(‘dsfddfs’,'aaaaa','dsff',([\"dasds\":545,\"dfsd\":464,\"sdf\":([\"sda\":15,\"dsfs\":3421]),\"sd\":21]),(‘fxcv’,'aaaaa','dsff',([\"dasds\":5495,\"dfsd\":42364,\"sdf\":([\"sda\":15,\"dsfs\":3221]),\"sd\":221]),(‘sscs’,'aaaaa','dsff',([\"dasds\":1545,\"dfsd\":4644,\"sdf\":([\"sda\":15,\"dsfs\":3221]),\"sd\":21])


这个awk要怎么写
文章评论

共有 1 条评论

  1. Gseain 于 2013-10-31 08:41:26发表:

    帮你顶下