cancel
Showing results for 
Search instead for 
Did you mean: 

will .bat file run on UNIX OS

dichaudhuri
Explorer
0 Kudos

Hi,

I hv a query, - my organization's internal PI development system is on Windows, where as my client's PI system is on UNIX. I have written a batch file which i am invoking from the receiver channel in the organization's PI Dev Box.

My query is : - will the .bat file be invoked in the unix OS as well from the receiver channel or do i need to write a shell script?

Accepted Solutions (1)

Accepted Solutions (1)

dichaudhuri
Explorer
0 Kudos

this is fixed. i have written a shell script and it works! - thanks guys!

Answers (4)

Answers (4)

christian_praus
Explorer
0 Kudos

your .bat file will not run on UNIX. As the other users said you will need a shell script. But be aware that you don't have a shell when using a OS command in file adapter on UNIX.

Under the hood you do a java exec().

In my opinion its better to use a perl skript. You have perl on unix and its available for windows too, so your scripts are portabel between the systems.

Writing a perl script for renaming some files took me some minutes, where as I couldn' t get the shell skript to work.

Former Member
0 Kudos

What does your batch file do? Maybe you can make the functionality using a Java adapter Module so it is compatible across both systems.

iaki_vila
Active Contributor
0 Kudos

Hi Diptendu,

I think you had better to ask in a linux forum. I have find thisRunning Windows Batch Files on Linux | Linux.org, you can check if the wine command  is installed in your linux platform. From my point of view, i would follow Hareesh suggestion and i would rewrite the batch files.

Regards.

former_member184720
Active Contributor
0 Kudos

I don't think you can execute windows cmd's on unix. So you might have to rewrite the functionality in shell script.