How To Find and Get Value From File Linux Command
I want to share how to find and get value from file linux command. This is very important when needed some value from existing file.
DATABASE_RADIUS=$(find ./ -type f -name "*.env" -exec grep 'DATABASE_RADIUS' {} \; | awk -F "=" '{print $2}')
Then print this value using below command.
echo $DATABASE_RADIUS
USERNAME_RADIUS=$(find ./ -type f -name "*.env" -exec grep 'USERNAME_RADIUS' {} \; | awk -F "=" '{print $2}')
Then print this value using below command.
echo $USERNAME_RADIUS
PASSWORD_RADIUS=$(find ./ -type f -name "*.env" -exec grep 'PASSWORD_RADIUS' {} \; | awk -F "=" '{print $2}')
Then print this value using below command.
echo $PASSWORD_RADIUS
Enjoy 🙂
If you see any error so please see my YouTube video for more help. Please subscribe my channel and share this link any others.