Hello,I am trying to make a script that downloads a random image from the internet and sets it as my background.I am not very good at this so any help is much appreciated
.So far i have something like this
Code:
#!/bin/sh
curl http://www.randomimage.us/index.php -o tmp.txt
cat tmp.txt | grep .jpg | xargs curl -o tmp.jpg
fbsetbg tmp.jpg
There is probably a easier way to do this but I dont know lol.
The problem I have here is with grep,I need it to only grep the url and not everything on that line.How can I do this?
Any help much appreciated
Thanks