add: standard run script based on guoyi.run

This commit is contained in:
kuoi 2024-01-14 23:05:59 +08:00
parent bee830bd42
commit 945ba6882b

54
3tnt.sh Executable file
View file

@ -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 <input_file> <guoyi.run>"
exit 1
fi
# Define tnt script
script_file=$2
if [ -z "$script_file" ]; then
echo "Usage: $0 <input_file> <guoyi.run>"
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"