Question: Edit the awk script below to count the lines in the input stream that matches the 4 patterns below. In the end, print the number
Edit the awk script below to count the lines in the input stream that matches the 4 patterns below. In the end, print the number of matches for each pattern.
1. Any words that have 'a','i' and 'o' in that order
2. Any words that have double letters (like letter)
3. Any number with a decimal point
4. Capitalized words at the beginning of the line.
******************Unix script:
#!/usr/bin/nawk -f # Sample awk program BEGIN { iss = 0; thes=0; } /is/ { print "file: " FILENAME"@" FNR " is:" $0; iss = iss + 1; } /the/ { print "file: " FILENAME"@" FNR " the:" $0; thes = thes + 1; } END { print "There were " iss " is words"; print "There were " thes " the words"; }Please answer questions in clear hand-writing and show me the full process, thank you so much. (Sometimes I get the answer which was difficult to read)
Exit
Skip to next question Answer
Step by Step Solution
3.46 Rating (166 Votes )
There are 3 Steps involved in it
Certainly To edit the given awk script to count the lines matching the four patterns described you can follow these steps Steps to Edit the awk Script ... View full answer
Get step-by-step solutions from verified subject matter experts
