Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
(AIX/ksh)我有一个中文文件...我无法在 aix 中使用 cat 完全打开它...如果我给 cat 则缺少一些内容...如果我给 cat -v 它会给出奇怪的代码....即使我尝试使用while循环来读取内容,但无法正常工作...我可以使用更多命令,但我不能在shell脚本中使用更多...所以请在这里提出一些想法...非常感谢
问题似乎是您的终端模拟器,而不是 cat 命令本身,它只是输出文件的内容而不进行处理。确保您的字符编码正确,应该是 LC_CTYPE、LC_ALL 或者 LANG,并且您的终端可以显示中文字符。