Home / Market / Cat Tool

Cat Tool

Concatenate and display file contents to standard output.

skill★ 00 dlclawhubMIT-0Install in CosmosUpstream Source

Documentation & Preview

#!/usr/bin/env python3 """Cat Tool - Display files.""" import argparse, sys parser = argparse.ArgumentParser() parser.add_argument('files', nargs='*', default=['-']) args = parser.parse_args() for f in args.files: try: print(open(f).read(), end='') except: print(f"Error reading: {f}", file=sys.stderr)