We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d3e8bd commit f9e2b0cCopy full SHA for f9e2b0c
get.sh
@@ -1,7 +1,14 @@
1
#!/bin/bash
2
-for item in `wget -O - https://location.services.mozilla.com/downloads | grep "MLS-full-cell"`
+wget -O- https://location.services.mozilla.com/downloads | grep "MLS-full-cell" > download.tmp
3
+while read -r line;
4
do
-echo "111 ${item}"
5
-done
6
-# | grep "`date +%Y-%m-%d`"
7
-
+#echo "111 ${line}"
+LASTLINE=$line
+done < download.tmp
8
+LAST_URL=`echo $LASTLINE | awk -F '"' '{print $2}' | awk -F '"' '{print $1}'`
9
+FILE=`basename $LAST_URL`
10
+echo $LAST_URL
11
+echo $FILE
12
+wget -O $FILE $LAST_URL
13
+gunzip $FILE
14
+rm -f download.tmp
0 commit comments