Skip to content

Instantly share code, notes, and snippets.

@faiwer faiwer/bash.sh Secret
Created Oct 2, 2015

Embed
What would you like to do?
xclip -selection clipboard -out > /tmp/ftp_clipboard
A=$(cat /tmp/ftp_clipboard);
A=$(echo $A | sed 's/\/home\/faiwer/http:\/\/ftp\.faiwer\.ru/g')
CODE=$(curl --write-out "%{http_code}\n" --silent --output /dev/null "$A")
echo $A
if [ $CODE != "200" ];
then
notify-send -u critical "Error" "Не удалось проверить файл $A"
else
notify-send -u normal "FTP" "$CODE :: $A"
fi
echo $A | xclip -selection clipboard -i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.