We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
今天用 uq 删除 Windows PowerShell 历史记录中的重复行时遇到 uq 输出不能保存的问题(可以正常输出到 stdout)。
uq
我尝试过的命令:
# 脚本中记录的用法 uq ConsoleHost_history.txt 1.txt # pipe cat ConsoleHost_history.txt | uq > 1.txt # redirect uq ConsoleHost_history.txt > 1.txt
可能的原因:编码问题,ConsoleHost_history.txt 使用的也是 UTF-8,EOL是CR LF
ConsoleHost_history.txt
我使用 dos2unix 转换的时候报错,手动移除对应字符后正常转换。但是 uq 的输出还是不能保存,所以和编码估计没关系。
dos2unix
$ dos2unix 1.txt dos2unix: Binary symbol 0x06 found at line 3700 dos2unix: Skipping binary file 1.txt
临时解决方案:使用 script 捕捉 uq 的输出,不知道为什么这个可以正常工作……
script
script output.txt uq 1.txt exit
运行完之后手动移除 output.txt 文件头尾的 script header 即可。
output.txt
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
No branches or pull requests
今天用
uq
删除 Windows PowerShell 历史记录中的重复行时遇到uq
输出不能保存的问题(可以正常输出到 stdout)。我尝试过的命令:
可能的原因:编码问题,
ConsoleHost_history.txt
使用的也是 UTF-8,EOL是CR LF我使用
dos2unix
转换的时候报错,手动移除对应字符后正常转换。但是uq
的输出还是不能保存,所以和编码估计没关系。临时解决方案:使用
script
捕捉uq
的输出,不知道为什么这个可以正常工作……script output.txt uq 1.txt exit
运行完之后手动移除
output.txt
文件头尾的 script header 即可。The text was updated successfully, but these errors were encountered: