sexta-feira, 7 de junho de 2024

Linux bash file returns unexpected token `$'do\r''

open file in vi edit with vi filename.sh command;

type in vi :set ff=unix command;

save file with :wq

It will save the file with unix line endings.


or

If you are using Geany and FTP, go to Geany -> Document -> Define End File -> Define and Convert to LF (Unix)

Save the document and send it again.


dentro do linux abra o arquivo no editor vi e digite :set ff=unix
depois salve e feche o arquivo com o comando :wq

Se esta usando Geany entre em Documento -> Definir Fim de Linha -> Definir e Converter para LF (Unix)

Nenhum comentário:

Postar um comentário

Linux bash file returns unexpected token `$'do\r''

open file in vi edit with   vi filename.sh   command; type in vi  :set ff=unix  command; save file with  :wq It will save the file with unix...