OrangeDog has asked why not use the environment variable directly. I have answered in the comment, and modified the general answer to reflect his later comment. The comment discussion was deleted, so now someone new asks the exact same question that was already answered, in the comment section of the same answer.
The new comment by jpmc26 is a duplicate of OrangeDog's, and would have been avoided if the comments weren't deleted. What is less doing with rpm, and how do I get that text without rpm