Skip to content

Instantly share code, notes, and snippets.

@etam
Last active August 2, 2016 10:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save etam/6983844f4cef5b344ff58ca2d9f642ef to your computer and use it in GitHub Desktop.
Save etam/6983844f4cef5b344ff58ca2d9f642ef to your computer and use it in GitHub Desktop.
#!/bin/bash
if (( $# != 3 )); then
echo "usage: $(basename "$0") type hash filename"
exit 1
fi
type="$1"
hash="$2"
filename="$3"
cat > "$filename.$type" <<EOF
$hash $filename
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment