[arch-general] a bit more script

John K Pate j.k.pate at sms.ed.ac.uk
Tue Mar 20 04:34:16 EDT 2012


On Tue, 2012-03-20 at 08:15 +0000, pete wrote:
> Hi folks .
> 
> Sorry to be a pain but i am still having a bit of fun (or not as the
> case may be)  with scripting here 
> 
> thanks to previous help i have 
> 
> for f in *jpg ; do echo "<a class=\"highslide\" href=\"$f\"
> onclick=\"return hs.expand(this)\"><img src=\"thumbs/\"$f\"></a>" ;
> done > awardgallery.html
> 
> which works well and generates 
> 
> <a class="highslide" href="img_0004.jpg" onclick="return
> hs.expand(this)"><img src="thumbs/"img_0004.jpg"></a>
> 
> The slight problem is in  this part <img src="thumbs/"img_0004.jpg">
> thumbs is a sub dir off the main photos with thumbnails in it they are
> named  img_0004_s.jpg  and i can get it to pick this fact up that means
> i have an edit job every time  . help with mods please folks 

https://www.google.com/search?q=string+handling+bash


==
John K Pate http://homepages.inf.ed.ac.uk/s0930006/


-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.



More information about the arch-general mailing list