I have a function that I used for testing software. I have to call this function where the function have 2 parameters, that is currentSetName and failureDetected. This is the code:
#!/bin/bash
failureDetected=0
nbOfAllTests=0
nbOfDetectedFailures=0`
currentSetName="fair"
count_input=1
removeFromCurrentSet(){
if [[("$1" == "good")]]
then
#mv Partition/currentSet/* Partition/good_used
echo "Hai good"
elif [[("$1" == "fair")]]
then
if [[("$2" == "0")]]
then
#mv Partition/currentSet/* Partition/poor_used
echo "hai fair poor_used"
else
#mv Partition/currentSet/* Partition/good_used
echo "hai fair good"
fi
else
#mv Partition/currentSet/* Partition/poor_used
echo "jjj poor"
fi
}
removeFromCurrentSet currentSetName failureDetected
I use the code above but it's not work well. Can you help me for the problem? how can I call the function exactly?