[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Sheflug] command as argument for grep



>
> 	grep "`date +%d %b %Y`" index.html
>


Chris

Thanks Chris and Ben

That works great.  I'd forgotten the closing backtick which I think is a
throw back to perl which IIRC (I can't think where else I've learned it)
only requires one back tick to indicate the start of a system command.

I've now got a list of files updated today and want to wget them.  (wget
created the index.html file)  I tried wget with -B to specify the base
url, -F to force html and -i to use the file I'd created using the grep
command above.  However wget just returned no "relative urls found in file".
So I now need to extract a list of files from the lines I got from grep.
Preceding every filename is href=" and following every file is ">.  In perl
I'd use split but I'm still getting away with using a shell script here so I
have a feeling I need sed or awk to extract the filenames.  Am I correct in
chasing down this route?


ChrisJ

--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.13 - Release Date: 16/01/2005


___________________________________________________________________

Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html

  GNU the choice of a complete generation.