git.slaskete.net
/
einar-bin
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2528aa2
)
Don't use cat
author
Einar Jørgen Haraldseid
<einar@haraldseid.net>
Tue, 7 Apr 2015 21:31:38 +0000
(23:31 +0200)
committer
Einar Jørgen Haraldseid
<einar@haraldseid.net>
Tue, 7 Apr 2015 21:31:38 +0000
(23:31 +0200)
screenshot.sh
patch
|
blob
|
history
diff --git
a/screenshot.sh
b/screenshot.sh
index 762005f4d3acdb95e8cf7f3cd598db2ed13a9886..973b58119c12948fb230b876044d00e2904d835d 100755
(executable)
--- a/
screenshot.sh
+++ b/
screenshot.sh
@@
-19,7
+19,7
@@
function errcho() {
}
function take_screenshot() {
- FILENAME="$(
cat /dev/urandom | tr -dc 'a-zA-Z0-9'
| fold -w 6 | head -n 1).png"
+ FILENAME="$(
tr -dc 'a-zA-Z0-9' < /dev/urandom
| fold -w 6 | head -n 1).png"
gnome-screenshot -f "${LOCALPATH}/${FILENAME}" -p "$@"
scp -q "${LOCALPATH}/${FILENAME}" "${REMOTEUSER}@${REMOTEHOST}:${REMOTEPATH}"
echo -n "${URLBASE}/${FILENAME}"|xclip -selection p