So, I'd like to have latest bash quotes on my desktop for later reading, and I want to only download those that I don't have. And I need help with finding/making that kind of script. Can anyone give me script like that, or point me in the right direction how to write one?
If you do not know how to make Bash scripts or use gawk, [url=http://tldp.org/LDP/Bash-Beginners-Guide/html/index.html]read about it[/url] for a few minutes. The only programs you will need to use (besides Bash) is [b]wget[/b] and [b]gawk[/b].
1. Grab the latest quote page with [b]wget[/b]
2. Parse through the file with [b]gawk[/b] and save each quote in its own file with its id as its filename. Ignore any id's with a number less than the one in the [i]latest[/i] text file.
3. Save the largest/first (same thing) id in the [i]latest[/i] text file
4. Enjoy your quotes
Hey, thanks! That's answer I was looking for! Not already done script, but instructions, so I can learn more, you actually double helped me by being lazy :P Thanks.
Sorry, you need to Log In to post a reply to this thread.