Find the answer to your Linux question:
Results 1 to 2 of 2
i have a problem with shell script (gawk) example: gawk -F ":" '$1 == $abc {print $0}' xyz it can't read $abc,if i change $abc = 1,2,3...a,b,c....it can read, please ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2011
    Posts
    1

    plz help me


    i have a problem with shell script (gawk)
    example: gawk -F ":" '$1 == $abc {print $0}' xyz

    it can't read $abc,if i change $abc = 1,2,3...a,b,c....it can read,
    please tell me how about to make it read $abc(because i have 1 variable at here) T_T

  2. #2
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    I can't quite understand the problem, as you've described it. Can you post the contents of file xyz? And also what is the variable $abc supposed to be?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •