Welcome to #!the dolphins, the website for rock 'n' roll music/(noise) and tux (computing)! Here, I'll be sharing computer tutorials and demos from the last but greatest rock band on planet earth (and possibly in the entire galaxy) since the Jonas Brothers.
I'm just an alien, so there will be some English mistakes. Don't hesitate to contact me (my email, if you're good64 enough to decode it: c2hlYmFuZ3RoZWRvbHBoaW5zQHByb3Rvbm1haWwuY29tCg==), to correct them or just to say hi! 🤗
For a French version of this website, click here 🇫🇷.
Oh yeah, and I like to change my css file every week or so…
ValueError: {'code': -32602, 'message': 'too many arguments, want at most 1'}
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 :