This question already has an answer here:
- How to compare strings in Bash script 8 answers
I have a bash script and variable $manufacturer_string within, which can have many values and need to write correct if statement, to determine, in which file, I need to write another variable $device_manufacturer0:
if manufacturer_string=Not_supported_devices; then
echo "$device_manufacturer0" >> $DIR/ToAddSysObjectID_list.txt
elif manufacturer_string="any other value"
echo "$device_manufacturer0" >> $DIR/KnownSysObjectID_list.txt
How to write correctly elif statement, if value of $manufacturer_string is not a "Not_supported_devices"?
Aucun commentaire:
Enregistrer un commentaire