%20%EC%9D%B8%EC%88%98%201%EC%9D%80%20None%EC%9D%B4%20%EC%95%84%EB%8B%88%EB%9D%BC%20str%EC%9D%B4%EC%96%B4%EC%95%BC%20%ED%95%A9%EB%8B%88%EB%8B%A4.%22.png)
다른 도구를 사용해야 할 수도 있지만 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
답변1
로케일 라이브러리가 기본 로케일을 찾을 수 없어 실패합니다. LANG
기본 로캘은 환경 변수(예: export LANG=en_US.utf-8
.