Answer the question
In order to leave comments, you need to log in
How to replace recursively urlencoded lines in files with normal ones using bash?
There is an archive of a static html site, some links in which are made like "lista-fundaci%C3%B3n". Folders and files, respectively, are called normally - lista-fundación. When you click on a link with special characters, the server returns 404. How to bring it into the proper form? I'm trying to write a command for autocorrect, but I'm not strong in bash.
Answer the question
In order to leave comments, you need to log in
function urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; }
for f in encoded.html enpage.html; do
urldecode `cat "$f"` > "$f"
done
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question