This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
PYTHONUNBUFFERED = "true" | |
try: | |
for line in sys.stdin: | |
# do stuff with line | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
# open stdin | |
$s = fopen('php://stdin','r'); | |
# check stdin for new logs | |
while ($input = fgets($s)) { | |
# do stuff with $input | |
} |
NewerOlder