Nitpicking: you don't really need cat, and the cut part could be a bit fragile as it relies on the amount of whitespace remaining constant. How about something like: Code: PROD=$(grep product /proc/component_version) PROD=${PROD##* }
PROD=$(grep product /proc/component_version) PROD=${PROD##* }