web stats
Mirth Community - View Single Post - How to execute linux commands
View Single Post
Old 10-11-2016, 04:33 AM
robrud robrud is offline
Mirth Newb
Join Date: Oct 2015
Posts: 12
robrud is on a distinguished road
Default 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 = org.apache.commons.io.IOUtils.toString(md5is);
Reply With Quote