Question : save output of command to craible bash
Answered by : thelazylemur
password=$(openssl rand -base64 32)
echo $password
Source : | Last Update : Fri, 13 Nov 20
Question : store printed output in variable bash
Answered by : armando-flores
#For storing and printing output at the same time do following:
OUTPUT=$(ls -1) #First assign output of command execution to a variable
echo "${OUTPUT}" #Then print out the result in variable into the terminal
Source : | Last Update : Thu, 24 Dec 20