Is there a way to selectively remove spaces in a string, in bash? e.g.
hello world你好 世界!
hello world你 好 世 界!
hello world 你 好 世 界!
你 好 世 界 hello world
and output:
hello world你好世界!
你好世界hello world
Notice I want to preserve spaces between English words or simply English alphabet, but not the others.
I understand python.re module is probably good for this, but i prefer a bash command if possible.