When I try to echo or print a string, it prints fine.
This is the string.
IP_NET_TP0 _
The structure is IP_NET_TP0, and 9 tabs (\t), then 7 spaces and 1 underscore at the end.
Ok, if you put that into a variable, let's say var1 and you print it as follows it works great.
echo $var1
echo "$var1"
BUT, if you add extra texts to it, for example, adding quotes, or adding a letter, it removes 1 space from the chain.
echo \"$var1\"
echo "'"$var1"'"
echo "a" $var1
WHY?! .. I have tried printing the variable with print, or like this ${var1}, and the output if the same, with 1 space less.
The following shows, the first one when printed with something else, and the second when printed alone.
IP_NET_TP0 _
IP_NET_TP0 _
Any help will be great.
printf(which is also a command, even a bash builtin)printf "\"%s\"" "${mat[c][0]}"I changed my var name to mat[][], but the behavior is the same.