import sys
if len(sys.argv) != 3:
print("Usage:", sys.argv[0], "<infile> <outfile>", file=sys.stderr)
sys.exit(1)
infile = open(sys.argv[1], "r", encoding="utf-8")
outfile = open(sys.argv[2], "w", encoding="utf-8")
for line in infile:
print(line, end='', file=outfile)
infile.close()
outfile.close()
Python implementation of /bin/echo
using indexing & while, not pythonesque