Skip to content

Instantly share code, notes, and snippets.

@tangnotes
Created July 18, 2018 09:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tangnotes/f737b5d7aae89b31195cea1963e83a93 to your computer and use it in GitHub Desktop.
Save tangnotes/f737b5d7aae89b31195cea1963e83a93 to your computer and use it in GitHub Desktop.
pngpage for Ubuntu
#!/bin/bash
file=$1
if [ "x$file" == "x" ]
then
echo "Usage: $0 FILE_NAME"
exit 1
fi
xclip -selection clipboard -t image/png -o > $file
if [ $? -ne 0 ]
then
echo "Failed to same png from clipboard"
exit 2
fi
file $file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment