cancel
Showing results for 
Search instead for 
Did you mean: 

Unix command in channel

Former Member
0 Kudos

Hello All,

I am trying to rename a file (which is created by channel) using "Run Operating System Command After Message Processing"

Following is the command that I mentioned in the channel:

mv /tmp/output.txt output_latest.txt

When a message is triggered from source, I can see the above command is executed successfully in channel audit log.

But the file is not being renamed.

Can some one tell me whether there is anything wrong in the syntax?

THanks,

Regards,

Naresh

Accepted Solutions (1)

Accepted Solutions (1)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>>Can some one tell me whether there is anything wrong in the syntax?

Yes Sinha pointed right. First go to shell prompt and then move command.

Your move command is right in syntax.

#!/bin/bash

mv oldfile newfile

Former Member
0 Kudos

thi means that you need to create a script on the file system

put the lines mentioned above in the script and then call the script.

Answers (1)

Answers (1)

aashish_sinha
Active Contributor
0 Kudos

Hi,

Enter #!/bin/bash or your shell information in first line.

#!/bin/bash or #!/bin/Ksh or #!/bin/Csh or whatever in your case.

next line will be your move command.

Regard

Aashish Sinha