From 945ba6882b4da21ba0839581ae86d25b59a98c4c Mon Sep 17 00:00:00 2001 From: Kuoi Date: Sun, 14 Jan 2024 23:05:59 +0800 Subject: [PATCH] add: standard run script based on guoyi.run --- 3tnt.sh | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100755 3tnt.sh diff --git a/3tnt.sh b/3tnt.sh new file mode 100755 index 0000000..bc05200 --- /dev/null +++ b/3tnt.sh @@ -0,0 +1,54 @@ +#!/bin/bash + +# Found TNT + +if [ -z "tnt" ]; then + echo "TNT not found" + exit 1 +fi + +# Define input data + +input_file=$1 + +if [ -z "$input_file" ]; then + echo "Usage: $0 " + exit 1 +fi + +# Define tnt script + +script_file=$2 + +if [ -z "$script_file" ]; then + echo "Usage: $0 " + echo "Warning: guoyi.run will be set as /usr/share/tnt/tnt_scripts/guoyi.run" + script_file="/usr/share/tnt/tnt_scripts/guoyi.run" +fi + + +# Define three weighting functions +task1() { + echo "Equal Weighting started" + tnt run $script_file $input_file 3 ew 0 str 5 EW, + echo "Equal Weighting completed" +} + +task2() { + echo "Implied Weighting started" + tnt run $script_file $input_file 3 iw 12 str 5 IW, + echo "Implied Weighting completed" +} + +task3() { + echo "Extended Implied Weighting started" + tnt run $script_file $input_file 3 eiw 12 str 5 EIW, + echo "Extended Implied Weighting completed" +} + +task1 +task2 +task3 + +echo "All tasks completed" +