-- Leo's gemini proxy
-- Connecting to nuacht.flounder.online:1965...
-- Connected
-- Sending request
-- Meta line: 20 text/gemini; charset=utf-8
For some reason, sed wasn't matching my string variable against another text body which contained the same text. Turns out there were control characters from another encoding type at the end of the string: M-BM-.
cat $var didn't show them, but cat -A $var did. Solution:
$ sed 's/Ctrl+Shift+ua0 (which looks like) $ sed 's/̲/̲u̲a̲0̲ (to be completed as usual) $ sed 's/ / /g' mytext.txt
I got this answer from https://askubuntu.com/questions/357248/how-to-remove-special-m-bm-character-with-sed
sed '1,/^WHATEVER$/d' sed "1,/$my_match/d"
sed '/TAGS/,$d'
sed '3,5d' file.txt
'$!N; /^\(.*\)\n\1$/!P; D' file.txt
sed -n '5,5p' file.txt
sed -n '/_HEADER_/q;p' index.template
sed -e '1,/_HEADER_/ d' index.template
sed 's|www\.[^ ]*|<a href="&">&</a>|g' <newtext.txt >newtext.html
would wrap <a href....></a> around urls starting with www, for example.
for f in *\ *; do mv "$f" "${f// /_}"; done
-- Response ended
-- Page fetched on Tue May 21 20:04:25 2024