From 3b05f58ef0de11d5d441fae115050313f78d4fde Mon Sep 17 00:00:00 2001 From: =?utf8?q?Einar=20J=C3=B8rgen=20Haraldseid?= Date: Mon, 2 Jun 2014 00:35:16 +0200 Subject: [PATCH] Terser version --- imgurgame-oneliner.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgurgame-oneliner.bash b/imgurgame-oneliner.bash index a95705c..d1bacdf 100644 --- a/imgurgame-oneliner.bash +++ b/imgurgame-oneliner.bash @@ -1 +1 @@ -while true; do url=http://i.imgur.com/$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 5 | head -n 1).jpg;if [[ $(curl -s -o /dev/null -I -w "%{http_code}" ${url}) == "200" ]]; then echo "Found ${url}"; fi; done +while true; do u=http://i.imgur.com/$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 5 | head -n 1).jpg;[ `curl -s -o /dev/null -I -w %{http_code} $u` == 200 ] && echo $u; done -- 2.30.2