{"id":16892852,"url":"https://github.com/wader/catgolf","last_synced_at":"2026-02-15T07:31:09.145Z","repository":{"id":46041906,"uuid":"417456952","full_name":"wader/catgolf","owner":"wader","description":"cat(1) golf","archived":false,"fork":false,"pushed_at":"2024-06-13T20:32:17.000Z","size":65,"stargazers_count":48,"open_issues_count":9,"forks_count":12,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-10-07T23:42:17.354Z","etag":null,"topics":["cat","e-sport","stdout"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wader.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-15T10:20:25.000Z","updated_at":"2024-11-21T02:04:47.000Z","dependencies_parsed_at":"2024-06-13T03:23:10.887Z","dependency_job_id":"86e5fb70-dd47-461b-bf5e-94cafedc46a3","html_url":"https://github.com/wader/catgolf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wader/catgolf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wader%2Fcatgolf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wader%2Fcatgolf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wader%2Fcatgolf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wader%2Fcatgolf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wader","download_url":"https://codeload.github.com/wader/catgolf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wader%2Fcatgolf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29472880,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T06:58:05.414Z","status":"ssl_error","status_checked_at":"2026-02-15T06:58:05.085Z","response_time":118,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cat","e-sport","stdout"],"created_at":"2024-10-13T17:12:38.806Z","updated_at":"2026-02-15T07:31:09.124Z","avatar_url":"https://github.com/wader.png","language":null,"readme":"\n# cat(1) golf\n\u003cimg style=\"float: right\" width=\"180\" src=\"catgolf.svg\"\u003e\nGet the file to stdout as intact as possible.\n\u003cdiv style=\"clear: both\"\u003e\n\n### Pure league\n\n- No shell features are involved.\n- Only outputs to `stdout`.\n\n\n```sh\ncat file.txt\nawk 1 file.txt\npaste file.txt\npv -q file.txt\npr -t file.txt\nsed b file.txt\ngrep ^ file.txt\ngrep $ file.txt\nsed '' file.txt\ngrep '' file.txt\nsort -m file.txt\nlook '' file.txt\njq -rR . file.txt\nsed -n p file.txt\ncut -b 1- file.txt\njq -jRs . file.txt\nperl -pe1 file.txt\ntail -n +1 file.txt\nhead -n -0 file.txt # GNU head\ncp file.txt /dev/fd/1\ngcc -E -P -xc file.txt\nscp file.txt /dev/fd/1\ncolumn -t -l 1 file.txt\ncomm file.txt /dev/null # BSD comm\nw3m -dump_source file.txt\ndd status=none if=file.txt # GNU dd\nhexdump -ve '\"%c\"' file.txt\nsplit --filter=tee file.txt # GNU split\njoin -a 1 file.txt /dev/null\nopenssl enc -none -in file.txt\ncurl file:///proc/self/cwd/file.txt\ngit -P grep --no-index -h ^ file.txt\nshuf --random-source=/dev/zero file.txt\nbat --color=never --style=plain file.txt\ndiff --line-format=%L /dev/null file.txt\nvim -es --clean '+w! /dev/fd/1' '+q!' file.txt\npython -c 'print(open(\"file.txt\").read()[:-1])'\nffmpeg -v quiet -f data -i file.txt -map 0:0 -c text -f data -\nemacs -Q --batch --eval '(princ (with-temp-buffer (insert-file-contents \"file.txt\") (buffer-string)))'\n```\n\n### Shell league\n\n- Can use shell feature like pipes, redirect etc to work.\n\n```sh\ntee \u003c file.txt\n\u003c file.txt \u003e\u00261 # assuming zsh and default NULLCMD\ntr a a \u003c file.txt\nrev file.txt | rev\ntac file.txt | tac\necho ',p' | ed -s file.txt\nxxd -p file.txt | xxd -p -r\n```\n\n### Brittle league\n\n- May not handle every character.\n- May not handle every file length.\n\n```sh\nsed '/*/p' file.txt\ngcc -E -P -xc file.txt\n```\n\n### Error league\n\n- Same as \"Pure league\", but errors on `stdout` and/or `stderr` are acceptable.\n\n```sh\ndd if=file.txt\ngcc -xc file.txt\n```\n\n### Junk league\n\n- Same as \"Error league\", but most of the output bytes are from the file.\n\n```sh\nm4 file.txt # Does not handle lines that starts with `#` or looks like definitions.\nfold file.txt # Works for files without long lines\nwall -n file.txt # I hope your file doesn't have any secrets\nuniq -Dw0 file.txt # Doesn't work for single-line files\nxargs -d\\n -a a.txt echo # Ends up with a trailing newline\nmore -e -n 65535 file.txt # Works for files with less than 65k lines.\nnl -bn -w 1 -s '' file.txt # Each line has an extra space\nwhile read l; do echo $l; done \u003c file.txt # See emanuele6's comment: https://github.com/wader/catgolf/pull/63#issuecomment-2164030897\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwader%2Fcatgolf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwader%2Fcatgolf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwader%2Fcatgolf/lists"}