awk -F": " '$1 ~ /^uuid/ { uuid=$2 }; $1 ~ /^device-config/ && $3 == "/dev/sdc" { print uuid }' dev.txt