/var/lib/ambari-server/resources/scripts/configs.sh get localhost c1 yarn-env |
awk '{ print "yarn-env", $0 }'
This short `awk` script will prepend the string `yarn-env` to each line of input from your command. The delimiter used is the `awk` variable `OFS` ("output field separator", a single space by default), so if you want a tab between the two, use
/var/lib/ambari-server/resources/scripts/configs.sh get localhost c1 yarn-env |
awk -vOFS="\t" '{ print "yarn-env", $0 }'
Alternatively, using `sed`:
/var/lib/ambari-server/resources/scripts/configs.sh get localhost c1 yarn-env |
sed 's/^/yarn-env /'