adds python implementations

- more README
- fix some C++ code along the way
This commit is contained in:
Johann Dreo 2022-08-31 00:24:52 +02:00
commit 016852e281
7 changed files with 199 additions and 43 deletions

13
pcat.py
View file

@ -1,8 +1,11 @@
#!/usr/bin/env python3
#
#!/usr/bin/env python
import sys
while True:
with open(sys.argv[1],'r') as fd:
print(fd.read(), flush=True)
if __name__ == "__main__":
while True:
with open(sys.argv[1]) as fin:
line = fin.readline()
sys.stdout.write(line)