- 论坛徽章:
- 28
|
本帖最后由 moperyblue 于 2016-07-29 14:00 编辑
- awk 'BEGIN{split("11 10 9 8 5 3 2 1",a)}{for(i in a)$0=gensub(/ /,",",a[i])}1'
复制代码 1.11.1.1,-,-,[28/Jul/2016:03:00:23 +0000],"GET / HTTP/1.1",304,0,"-","Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko"- awk -vRS='\\[[^]]*|"[^"]*"' -vORS= '{RT=gensub(/ /,"@","g",RT);gsub(/ /,",");gsub(/@/," ",RT);print $0 RT}'
复制代码 1.11.1.1,-,-,[28/Jul/2016:03:00:23 +0000],"GET / HTTP/1.1",304,0,"-","Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko" |
|