Find the answer to your Linux question:
Results 1 to 2 of 2
Hi All, I hope this is the right place for this question. I am in an introductory Linux & scripting class and our first assignment was to make a script ...
  1. #1
    Just Joined!
    Join Date
    Feb 2010
    Posts
    1

    using grep and wc

    Hi All,

    I hope this is the right place for this question. I am in an introductory Linux & scripting class and our first assignment was to make a script to find certain strings with grep and wc. I know the basics for grep and wc but I do not know how to find specific strings.

    for example I know if I wanted to find the word "first" in a file called Constitution it would read something like

    grep -r first /Constitution.


    Our first assignment is to look at the Constitution and find certain strings

    *How many 4-letter words?
    *Are there any words with no vowels?
    *Find "1-syllable" words with exactly one vowell / with 2 vowells
    and
    *some words with two orthographic vowels with only one phonological vowel (i.e. the word "read")

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    Hi and Welcome !

    You can do that easily using grep | wc combination. We can't help you in Home Work Assignments. Its against Forum Rules.
    Check manual of grep and wc. You can find a lot of online tutorials on this.

    If you have any specific question, do not hesitate to start a new thread.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

Posting Permissions

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