Stupid missing fi
[einar-bin] / screenshot.sh
index 858797a30c48bb7cd801bd4e4ef2006b74ebdb49..973b58119c12948fb230b876044d00e2904d835d 100755 (executable)
@@ -19,11 +19,11 @@ function errcho() {
 }
 
 function take_screenshot() {
 }
 
 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}"
   gnome-screenshot -f "${LOCALPATH}/${FILENAME}" -p "$@"
   scp -q "${LOCALPATH}/${FILENAME}" "${REMOTEUSER}@${REMOTEHOST}:${REMOTEPATH}"
-  printf "${URLBASE}/${FILENAME}"|xclip -selection p
-  printf "${URLBASE}/${FILENAME}"|xclip -selection c
+  echo -n "${URLBASE}/${FILENAME}"|xclip -selection p
+  echo -n "${URLBASE}/${FILENAME}"|xclip -selection c
   notify-send -i applets-screenshooter "screenshot.sh" "Screenshot published to ${URLBASE}/${FILENAME}"
 }
 
   notify-send -i applets-screenshooter "screenshot.sh" "Screenshot published to ${URLBASE}/${FILENAME}"
 }