I want to concatenate string and int. But it doesn't work with & and add operator.
echo "abc" & 2
But it doesn't work.
I want to concatenate string and int. But it doesn't work with & and add operator.
echo "abc" & 2
But it doesn't work.
There's an operator $
that converts something to string.
echo "abc" & $2
echo "abc", 2 # echo automatically applies `$` to its arguments
© 2022 - 2024 — McMap. All rights reserved.