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.

Required fields*

6
  • 1
    Do you need to find all the names of a given gender using the grep command? Can you better give a sample input and output that you expect so that it would be much more clear? Commented Jan 8, 2015 at 20:59
  • you can not use “” quotes you have to use " Commented Jan 8, 2015 at 21:55
  • I see nothing wrong except the quotes and that you already know field 3 as that is what you search for. It could also miss trigger, for example I know someone whose name is male, see is female. Commented Jan 8, 2015 at 22:01
  • the code does not work, and if i purely use grep $gender Information.txt, it will return all 3 information as in the gender section, it contains "male" and fe"male" Commented Jan 9, 2015 at 1:09
  • @Ramesh how else would i be able to do it ? Commented Jan 9, 2015 at 14:09