Skip to content

Instantly share code, notes, and snippets.

@kuanyui
Last active May 26, 2020 06:23
Show Gist options
  • Save kuanyui/26cfa276cf83e4491a646b1acda8b83a to your computer and use it in GitHub Desktop.
Save kuanyui/26cfa276cf83e4491a646b1acda8b83a to your computer and use it in GitHub Desktop.
var path = require('path')
var child_process = require('child_process')
const rootDir = path.join(__dirname, '../.')
child_process.exec(
`grep -RIPzo --no-filename --include=\\*.proto "(?s)\\n rpc (Get|Set|Run).*?(get|post|put|delete):\\N+" "${rootDir}"`,
{ maxBuffer: 1024 * 500 * 1024 },
function (error, stdout, stderr) {
const list = stdout.split(/\0/)
console.log(list.length)
// for (const x of list) {
// console.log(x)
// }
console.log('fuck=>', list)
console.log('stderr==>', stderr)
console.log('err==>', error)
}
);
grep -RIPzo --no-filename --include=*.vue '\$t\(.+?\)' PATH/TO/DIR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment