I have foo.rar, and I want to read the file comment
How to do it in Linux command line?
Try:
rar v archive.rar fname | grep Comment:
should work for a one-liner comment. If the comment spans multiple lines you will need more sophisticated output parsing.