Hi, how can I delete special characters like "힚팧" and leave only normally visible ones like "01abŁÐ....".
With the code I can display, but not filter them out.
Code: Select all
zcat /usr/share/i18n/charmaps/UTF-8.gz | awk '{if(NR>25001 && NR<27000) {gsub(/\//, "\\\\"); system("/usr/bin/echo -ne "$2" | grep -oP \"[^\\x00-\\x7F]\""); split($2, z, "\\"); print z[1]}}'
a="💩🐕01abŁÐ힚팧" # should look like this "01abŁÐ" or "💩🐕01abŁÐ"
echo ${a//[![:graph:]]/} # delete nothing "💩🐕01abŁÐ힚팧"
tr -dc '[[:graph:]]' <<< $a # delete too mutch "01ab.."