Skip to content

Instantly share code, notes, and snippets.

@kunpengku
Created June 24, 2014 02:22
Show Gist options
  • Select an option

  • Save kunpengku/c11af29af24cccfabfbd to your computer and use it in GitHub Desktop.

Select an option

Save kunpengku/c11af29af24cccfabfbd to your computer and use it in GitHub Desktop.
在日志中查找,选段,消去左右。得到需要的字段
#!/bin/bash
#grep "Got AppInfo by AppKey.*succeed" some.log | awk '{print $13}' > tmptest.key
while read dt
do
key=${dt##App*[}
key=${key%]}
echo $key
done < tmptest.key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment