Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • This works well, except for an issue I encountered i.e. I am unable to completely read strings that contain the dollar sign e.g. one of my password strings in an environment file contains a dollar sign. If I use single quotes on the password string, then I can read it.. However, if I use single quotes for every line, then the variable expansion from previously defined variables no longer happens... Commented Aug 24, 2022 at 1:55
  • P.S. I think I fixed this by using double quotes wherever variable expansion was needed, and single quotes elsewhere. Commented Aug 24, 2022 at 2:15
  • You are correct that single quoted strings disable interpolation of variables. That's true of everywhere in the shell and remains true in this scenario. Commented Aug 24, 2022 at 13:54