From 190f00029ec60c4f2d28510a8e8b47041eaf0865 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 30 Mar 2009 15:47:40 +0200 Subject: use grep in tempfs.sh --- tempfs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tempfs.sh') diff --git a/tempfs.sh b/tempfs.sh index 2602b9e..fd7401e 100755 --- a/tempfs.sh +++ b/tempfs.sh @@ -1,6 +1,6 @@ #!/bin/bash #---------------------------------------------------- -# Version: 0.1.0 +# Version: 0.1.1 # Author: Florian "Bluewind" Pritz # # Copyright (C) 2009 Florian Pritz @@ -12,7 +12,7 @@ # Upload file to tempfs and copy URL to cpulboard #---------------------------------------------------- -URL=$(curl -# -F userfile="@$1" -F 'expirationTime=5' -H "Expect: " http://www.tempfs.com/upload.php | ack 'http://.*/uploadedFiles/[^\s]*?' | sed 's/<\/span>//') +URL=$(curl -# -F userfile="@$1" -F 'expirationTime=5' -H "Expect: " http://www.tempfs.com/upload.php | grep -o 'http://.*/uploadedFiles/.*' | sed 's/<\/span>//') echo -n $URL | nohup >/dev/null 2>&1 xclip echo $URL -- cgit v1.2.3-24-g4f1b