What is the easiest way to convert an IDN (such as президент.рф) to Punicode in bash?
Assuming you have python on your system, python -c 'import sys;print sys.argv[1].decode("utf-8").encode("idna")' "президент.рф"
would do the trick.
Check more discussion of this question.