i searched the forum and stumbled across some relevant questions but none of the answers working for me
im playing around with bash scripting, adb and want to get some basic informations from the mobile phone
sdk_version=$(adb shell getprop ro.build.version.sdk)
sdl_version=$(adb shell getprop ro.build.version.sdl)
android=$(adb shell getprop ro.build.version.release)
model=$(adb shell getprop ro.product.model)
name=$(adb shell getprop ro.product.name)
serial=$(adb shell getprop ril.serialnumber)
printf 'SDK: %s\n' $sdk_version
printf 'SDL: %s\n' $sdl_version
printf 'Product: %s\n' $model $name (i think this version was working, but results in two seperate lines with Product:)
well this is quite simple and works without problems, one line, one var, but when i want to concat 2 of these vars like model and name in one line, the result is an "overwritten line" when outputting the result looks like "xcover 39F" (first string is partly overwritten), the desired result should be a string like "SM-G389F xcover3"
what i tried so far after reading some other questions here
concat with the help of a thirdvar like
vara="a"
varb="b"
varc="%s %s"
printf "$varc" $vara $varb
or
vara="a"
varb="b"
varc="${vara}${varb}"
printf '%s\n' $varc
using mostly all combinations with/without curly brackets but nothing results in the desired output, the output is empty or fully/partly overwritten
what i need is a possibility to concat 2 or more of the above output vars, as one string