I want to read a value from a known file.
File is located at /root/.my.cnf and contains
[client]
password='PosftGlK2y'
I would like to return PosftGlK2y - ideally using a simple one liner command.
I have tried
cat /root/.my.cnf | grep password
which returns password='PosftGlK2y'
I am sure there is a better way.
cat--grepcould read the file. That's call UUoC (Useless Use ofcat).