Bienvenue sur le site #!the dolphins, un site de zik et de tux!
Donc au menu quelques tutos informatique et j'y mets aussi les démos (du dernier) et meilleur groupe de rock au monde depuis les BB Brunes.
Si besoin de me contacter, par mail : skcor.dts@tcatnoc
Ah oui, et j'ai l'habitude de modifier mon fichier css à peu près toutes les semaines…
IFS=$'\n';
#Replace <br /> to <br>
sed -i 's|<br />|<br>|' *.html
for FILE in *html;
do
#get the line number of the <head> tag
LINE_START=$(cat -n $FILE | grep '<head>' | awk '{ print $1 }')
#get the line number of the </head> tag
LINE_END=$(cat -n $FILE | grep '</head>' | awk '{ print $1 }')
#for each line between <head> and </head>
for i in $(sed -n ${LINE_START},${LINE_END}p $FILE);
do
#Replace /> by > in the current line and put result in a RESULT variable
RESULT=$(echo "$i" | sed "s|[ ]\?/>|>|")
#Edit current file and replace current line by RESULT variable
sed -i "s|"$i"|$RESULT|" "$FILE"
done
#get the line number of the <div id="corps"> tag
LINE_START=$(cat -n $FILE | grep '<div id="corps">'| awk '{ print $1 }')
#get the line number of the <div class="menu_mobiles_bottom"> tag
LINE_END=$(cat -n $FILE | grep '<div class="menu_mobiles_bottom">' | awk '{ print $1 }')
#for all lines that contain the term <img between
#<div id="corps"> and <div class="menu_mobiles_bottom"> tags
for i in $(sed -n ${LINE_START},${LINE_END}p $FILE | grep "<img");
do
#Replace /> by > in the current line and put result in a RESULT variable
RESULT=$(echo "$i" | sed "s|[ ]\?/>$|>|")
#Edit current file and replace current line by RESULT variable
sed -i "s+"$i"+$RESULT+" "$FILE"
done
done
Contact :