Find the answer to your Linux question:
Results 1 to 3 of 3
Hi Guys, How do you use shell script and awk to 1. Search for the users input (an exact match) in the 1st column of the csv file 2. Check ...
  1. #1
    Just Joined!
    Join Date
    Oct 2008
    Location
    Edinburgh, Scotland
    Posts
    18

    Unhappy Shell Script & AWK syntax

    Hi Guys,

    How do you use shell script and awk to

    1. Search for the users input (an exact match) in the 1st column of the csv file
    2. Check the 2nd column to see if it says either 'Home' or 'Business'
    3. Echo the appropriate headings (based on what was found in the 2nd column) with the data found in all other columns

    I'm guessing I would need to use an 'if' statement combined with awk ...

    can anyone help?

  2. #2
    Just Joined! TuxKnight's Avatar
    Join Date
    Sep 2008
    Location
    New Zealand
    Posts
    28
    This will help with the awk
    AWK Programming

    and this for shell
    How to write a shell script

  3. #3
    Just Joined!
    Join Date
    Oct 2008
    Location
    Edinburgh, Scotland
    Posts
    18
    Thanks very much TuxKnight, I'll have a look at those.

Posting Permissions

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