This shows a simple example of calling the external tools node. The workflow data directory contains all the necessay files:
input.txt
addNumber.sh
output.txt
The addNumber.sh script requires two Command Line Arguments. The first is the path to the file you would like to read and the second is the number you would like to add to the input. You may get a permissions error running the script, and can set full read-write-execute access to the script by running the command "chmod u=rwx,g=rwx,o=rwx addNumber.sh"
The script itself:
#! /bin/bash
filename=$1
n=$2
while read line; do
sum=$(($line + $n))
echo $sum >>output.txt
done < $filename
Workflow
External Tools
Used extensions & nodes
Created with KNIME Analytics Platform version 4.4.2
Legal
By using or downloading the workflow, you agree to our terms and conditions.