Skip to content

Instantly share code, notes, and snippets.

@spraints
Created August 20, 2009 14:28
Show Gist options
  • Select an option

  • Save spraints/171093 to your computer and use it in GitHub Desktop.

Select an option

Save spraints/171093 to your computer and use it in GitHub Desktop.
require 'zlib'
print Zlib::GzipReader.new($<).read
#!/bin/sh
cat > test.txt <<EOF
hi
this is a test.
EOF
gzip -c test.txt > test.gz
if ruby guns_and_zips.rb < test.gz | diff test.txt -
then
echo 'OK!'
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment