summaryrefslogtreecommitdiff
path: root/Lib/test/subprocessdata/qgrep.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/subprocessdata/qgrep.py')
-rw-r--r--Lib/test/subprocessdata/qgrep.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/subprocessdata/qgrep.py b/Lib/test/subprocessdata/qgrep.py
new file mode 100644
index 0000000000..69906379a9
--- /dev/null
+++ b/Lib/test/subprocessdata/qgrep.py
@@ -0,0 +1,10 @@
+"""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)