Created
July 18, 2018 09:46
-
-
Save tangnotes/f737b5d7aae89b31195cea1963e83a93 to your computer and use it in GitHub Desktop.
pngpage for Ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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