protocol=udp # or tcp
# If-then implementation
if [$protocol == udp]
then
prefix=@
else
prefix=@@
fi
# Case-switch implementation
case "$protocol" in
#case 1
"udp") prefix=@ ;;
#case 2
"tcp") prefix=@@ ;;
#case 3
"") prefix=@@ ;;
esac
echo "$prefix"
December 18, 2020December 18, 2020
0 Comments