1

I have the following code:

export my_var=3
cat /etc/passwd | awk {'print $1'}

Now I need to use my my_var in my awk pseudo code.
How can I apply this?

terdon
  • 242,166
omid as
  • 21
  • 1
    I'd love to know where people are getting the idea to put the delimiting quotes inside the awk (or sed or whatever) script instead of around it, e.g. writing awk {'foo'} instead of awk '{foo}'. – Ed Morton Feb 01 '22 at 00:28

0 Answers0