Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
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