No announcement yet.

How to execute linux commands

  • Filter
  • Time
  • Show
Clear All
new posts

  • How to execute linux commands

    Hi all,

    I'm new to Mirth Connect and my first impression - it is a very powerful integration engine and provides a lot of integrated solutions, but I have some problems with decode (later also encode) zip Files. I have found some threads ( but they don't really help me. I need some solution where I can work with scripting or at least I can execute Linux Command like (for example unzip with 7zip). Please, help me to find some solution.

    Best regards

    Last edited by mpa; 09-26-2016, 07:12 AM.

  • #2
    If your problem is zipping/Unzipping a file, you can do through Java script. The code is in the link you have.

    If your problem is executing a windows command through Mirth, that can be done but will be very tedious to achieve, through this

    java.lang.Runtime.getRuntime().exec("system_comman d");

    But there will be lot of modifications you need to make in it.
    HL7v2.7 Certified Control Specialist!


    • #3
      Hi siddharth,

      the code from the link above doesn't work for me, probably I do something wrong...

      Sooner or later I will need the possibility to execute shell scripts and other cli's commands. It would be helpful and nice from you if you could help me a little bit on this way.

      Sorry for my english!

      Best regards



      • #4
        Shell Scripts


        Here my codesnippet from a Source-Transformer calculating the MD5-Sum on a Ubuntu OS. Mirth 3.3.2. If you search the Forum for getRuntime.exec you'll find a lot of other examples for executing shell commands.

        var md5p = java.lang.Runtime.getRuntime().exec('md5sum /.../' + sourceMap.get('originalFilename'));
        var md5is = md5p.getInputStream();
        var md5content =;