pyrviq problem s promqnata na charset-a go reshih : 
#!/bin/bash
files=`ls |grep html`
for file in $files; do
str=`grep charset $file |awk '{print $4}' |cut -c 1-18 ` 
sed s/$str/charset=windows-1251/  $file > $file.new
# backup old ones
#mv $file $file.bak
mv $file.new $file
done

Ne uspqh da smenq paths oba4e:
SRC="/absolute/path/against/my/dir_hierarchy/linux-book/images/xfce1.jpg"
ALT="/absolute/path/against/my/dir_hierarchy/linux-book/images/xfce1.jpg">
s
SRC="images/xfce1.jpg"
ALT="images/xfce1.jpg">

Opitah s Perl, nesto ot sorta , no ne stana:
#!/bin/bash
abspath="/absolute/path/against/my/dir_hierarchy/linux-book/images";
relpath="images";
files=`ls |grep html`
for file in $files; do
perl -i -pe 's/$abspath/$relpath/' $file
#for backups  -i  ->  -i.bak

Ta grizhata e da smenq tezi paths v html files...
Sorry za spam-a , 
10x

===========================================================================
A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers)
http://www.linux-bulgaria.org/ Hosted by Internet Group Ltd. - Stara Zagora

Reply via email to