5 ms·
Here it is, courtesy of a wayback snapshot[1] #!/bin/bash # List all python source files which are more than 1KB and contain the word "copilot". find . \
by tyingq 5y ago
Here it is, courtesy of a wayback snapshot[1]
#!/bin/bash
# List all python source files which are more than 1KB and contain the word "copilot".
find . \
-name "\*.py" \
-size +1000 \
-exec grep -n copilot {}\;
[1] https://web.archive.org/web/20210701061847if_/https://copilot.github.com/ https://web.archive.org/web/20210701061847if_/https://copilo...
- onionisafruit 5y agoThe missing space isn't the only thing wrong there. - This lists the lines containing copilot instead of the files. You want `grep -l` to list the files. - `--size +1000` finds files with over 1000 blocks. `--size +1000c` gets you files over 1KB. - `-name "*.py"` only finds files literally named `.py`. To find files that match the glob `.py`, you would single quote it like `-name '*.py'`