Install convmv if you don't have it
sudo apt-get install convmv
Convert all files in a directory from NFD to NFC:
convmv -r -f utf8 -t utf8 --nfc --notest .
Convert all files in a directory from NFC to NFD:
convmv -r -f utf8 -t utf8 --nfd --notest .
Hi fguern, if you're referring to mac2syn or syn2mac, these scripts read from file or stdin, and output on stdout.
So, suppose you have file with NFD UTF text, called my_nfd_utf.txt (for instance), you type
mac2syn my_nfd_utf.txt
or
mac2syn < my_nfd_utf.txt
or
some-other-program-producing-the-text | mac2syn
make sure the script is executable (chmod 750 mac2syn)
If you have a string that needs translating, the syntax is
echo $(mac2syn <<< "string_or_variable_with_nfd_utf_text")
Cheers, Henk