From 120084b95f482f46b8297e685c6120747082df08 Mon Sep 17 00:00:00 2001 From: Low-Wee Heng Date: Tue, 20 Mar 2012 23:15:19 +0800 Subject: [PATCH] added a simple on that grep mediafire links --- simple.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 simple.sh diff --git a/simple.sh b/simple.sh new file mode 100755 index 0000000..5f30f98 --- /dev/null +++ b/simple.sh @@ -0,0 +1,16 @@ +# README +# Input file: Text file with some links +# Output file: Mediafire links to stdout +# Note: The links are 'simple' such that there is no redirection, and mediafire links are easily grep-able + +INPUTFILE=$1 + +cat $INPUTFILE | while read LINE +do +echo $(curl $LINE | tr "\"" "\n" | grep mediafire) >> ThisIsTheTempFileYouCannotMiss.txt +done +cat ThisIsTheTempFileYouCannotMiss.txt +if [ -e ThisIsTheTempFileYouCannotMiss.txt ] +then +rm ThisIsTheTempFileYouCannotMiss.txt +fi