I have these parameter in postgres-config.ini file:
PGUSER=usr
PGPASSWORD=pass
PGDATABASE=myDB
PGHOST=localhost
PGPORT=5432
I want to parse it and connect to database using shell script (sh file). I use source and grep command like this:
source <( grep = postgres-config.ini )
However, when I tried to print the values using echo $PGHOST
it not printing anything.
Can anyone help me what I am doing wrong?