Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Need help writing a code in UNIX  (Read 5017 times)

0 Members and 1 Guest are viewing this topic.

LionTamer619

    Topic Starter


    Starter

    • Experience: Familiar
    • OS: Mac OS
    Need help writing a code in UNIX
    « on: May 06, 2016, 04:20:09 PM »
    I'm writing a UNIX shell script and I need to write a code using a text file. For each line in the text file, the third field ranges from 2 through 6.

    2=Sparkling, 3=Foritified, 4=Sweet, 5=White, and 6=Red. I need to make it so that if the third field is a 2, it would add 1 to the counter "Sparkling" and so on. How can I do this? Thank you for any help