Notice
Recent Posts
Recent Comments
Link
«   2026/01   »
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Tags
more
Archives
Today
Total
관리 메뉴

main

[Linux] 에러: syntax error near unexpected token `$'{\r'' 본문

ETC

[Linux] 에러: syntax error near unexpected token `$'{\r''

1984 2022. 3. 25. 15:32

에러

syntax error near unexpected token `$'{\r''

 

원인

Windows/UNIX OS 간 개행 문자 차이로 인한 에러입니다.

 

해결 방법

아래 명령어로 파일의 개행 문자를 변경합니다.

sed -i 's/\r//' <file_name.sh>

 

728x90
Comments