Awk script to filter text output to single line

Solution 1:

Assuming you're using bash, something like this?

WORDS=$( your_script | awk '{printf("%s ",$1);}' )

printf 'You need to get: %s\n'  "${WORDS}"
printf 'Run: yum install %s'  "${WORDS}"