seaswalker / posts

0 stars 0 forks source link

AWK #61

Open seaswalker opened 1 year ago

seaswalker commented 1 year ago

抽取文件中特定规则字符串:

awk 'match($0, /orderNo=([0-9]+),/, a) {print \",\\\"\"a[1]\"\\\"\"}' .\orders.txt

原始内容格式比如:

name="skywalker",orderNo="73239123",city="上海"