I am trying to remove docker container and and store or compare the result but i am unable to do that kindly let me know how to get the return value for further process
delete_the_container() {
res= docker container rm -f $1 && echo "success" || echo "fail"
echo "$?"
}
fielpos="./filename"
input="./filename"
while IFS= read -r line
do
#echo "$line"
res= $(delete_the_container $line)
echo "$res" #not get the res value
done < "$input"