Download cpython_2/environment/repo/Lib/test/subprocessdata/qgrep.py from lolbench26/LoLBench: direct link, hf CLI and curl.
- Browser
- Download file 253 Bytes
-
https://huggingface.co/datasets/lolbench26/LoLBench/resolve/main/cpython_2/environment/repo/Lib/test/subprocessdata/qgrep.py
- Command line
-
hf download hf://datasets/lolbench26/LoLBench/cpython_2/environment/repo/Lib/test/subprocessdata/qgrep.py
-
curl -L -o qgrep.py https://huggingface.co/datasets/lolbench26/LoLBench/resolve/main/cpython_2/environment/repo/Lib/test/subprocessdata/qgrep.py
253 Bytes
| """When called with a single argument, simulated fgrep with a single | |
| argument and no options.""" | |
| import sys | |
| if __name__ == "__main__": | |
| pattern = sys.argv[1] | |
| for line in sys.stdin: | |
| if pattern in line: | |
| sys.stdout.write(line) | |