也许我应该用另一种工具,但rpl一直对我来说是这样的.
rpl -Ris "oldname.com" "newname.com" *(如果你想知道,R=递归,i=忽略情况,S=模拟)
错误是..。
The files listed below would be modified in a replace operation.
Traceback (most recent call last):
File "/usr/bin/rpl", line 314, in <module>
main()
File "/usr/bin/rpl", line 246, in main
matches = blockrepl(f, o, regex, old_str, new_str, 1024)
File "/usr/bin/rpl", line 92, in blockrepl
parts = (after.join(parts)).encode(encoding=encoding, errors='ignore')
TypeError: encode() argument 1 must be str, not None发布于 2021-07-27 15:33:47
语言环境库无法找到默认的区域设置,因此失败。可以通过设置LANG环境变量来设置默认区域设置(如export LANG=en_US.utf-8 )来解决此问题。
https://unix.stackexchange.com/questions/517264
复制相似问题