Code Monkey home page Code Monkey logo

catgolf's Introduction

cat(1) golf

Pure league

  • No shell features involved
  • Only output on stdout
cat file.txt
awk 1 file.txt
paste file.txt
pv -q file.txt
grep '' file.txt
sort -m file.txt
sed -n p file.txt
cut -b 1- file.txt
jq -rRs . file.txt
perl -pe1 file.txt
sed '/*/p' file.txt
tail -n +1 file.txt
head -n -0 file.txt (GNU head)
gcc -E -P -xc file.txt
comm file.txt /dev/null (BSD comm)
cp file.txt /dev/stdout
scp file.txt /dev/stdout
w3m -dump_source file.txt
dd status=none if=file.txt (GNU dd)
hexdump -ve '"%c"' file.txt
openssl enc -none -in file.txt
curl file:///proc/self/cwd/file.txt
git -P grep --no-index -h ^ file.txt
bat --color=never --style=plain file.txt
diff --line-format=%L /dev/null file.txt
python -c 'print(open("file.txt").read()[:-1])'
vim -es --clean '+w! /dev/stdout' '+q!' file.txt
ffmpeg -v quiet -f data -i file.txt -map 0:0 -c text -f data -
emacs -Q --batch --eval '(princ (with-temp-buffer (insert-file-contents "file.txt") (buffer-string)))'

Pipe league

tee < file.txt
tr a a < file.txt
rev file.txt | rev
echo ',p' | ed -s file.txt

Error league

  • Same as pure but can have errors on stdout and stderr
dd if=file.txt
gcc -xc file.txt

Junk league

  • Same as error but most bytes from the file

catgolf's People

Contributors

wader avatar jwilk avatar xyproto avatar magisterquis avatar andoma avatar alokmenghrajani avatar jaanvaks avatar qbit avatar benhoyt avatar tomska-pfsw avatar kotborealis avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.