#!/bin/bash #mymodel=`cat /sys/firmware/devicetree/base/model 2>/dev/null` # https://stackoverflow.com/a/46163991 model="" while IFS= read -r -d '' substring || [[ $substring ]]; do model+="$substring" done