this is what I've tried (and a few other iterations). snippet from file
APOLLO_KEY=service:abcd
cat packages/graph/.env | gawk '{ if ($0 = "APOLLO_KEY" ) { RS = "=" } ; { print $1 } }'
it returns APOLLO_KEY
instead of the value for each row in the file. the value I would expect and want to get is
service:abcd
I get that there are considerable issues with parsing the file this way. I'm just doing it for some one off commands, and at this point am frustrated with my awk knowledge/googling.
APOLLO_KEY
variable specifically (which would be available as$APOLLO_KEY
after sourcing the file), or whether you want to see all values for all variable names. – Kusalananda Aug 13 '20 at 16:27gawk '{ if ($0 = "SOMETHING RANDOM" ) { print } }'
– terdon Aug 13 '20 at 16:54