Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
shalinim1
Contributor III
Contributor III

sed command in tsystem

Hi,

My job has only one component 'tsystem' in the use single command, I'm passing the command as follows.

Command: "sed 's/\r$//' file.sh > file_new.sh"

While running the job, getting the error "sed: -e expression # 1, char 1: unknown command: `''". Where as the same command running successfully in Unix.

Can anyone help to solve the error.

Labels (3)
2 Replies
jlolling
Creator III
Creator III

"sed 's/\\r$//' file.sh > file_new.sh"

Pease take care the backslash in Java strings have to be escaped if you want them to survive.

Otherwise you send a \r (means carriage return - this will disrupt the command).

shalinim1
Contributor III
Contributor III
Author

@Jan Lolling​ changed the command as you suggested and ran the job, but it got failed with the same error