
27 Jan
2014
27 Jan
'14
2:02 a.m.
On Mon, Jan 13, 2014, at 17:44, Andrew McGlashan wrote:
#!/bin/bash
( curl -Ss "https://googledrive.com/host/0B2KTxndVFSKuSjZKTDRaTlpJcmM/"| \ sed 's`<a href`\n<a href`g'| \ grep '^<a href'| \ awk -F\" '{print "wget -c \"https://googledrive.com"$2"\""}' ) | tee y.y chmod +x y.y ./y.y rm y.y
You could also avoid the temporary executable file by piping the generated commands directly into the shell, sh or bash or whatever. Something I do all the time: generate-commands | less to check that the generated commands look OK, then up-arrow to get the command back, and edit it to generate-commands | sh to run them, where "generate-commands" is stuff like the above (though I mostly use Perl). -- Smiles, Les.