Question

[UNIX] EASY QUESTION ======================================================

[3] One type of affinity license plate in Ontario consists of the pattern. NNAANN where N is a numeric digit and A is a letter of the alphabet for example 32 ML68 or 59PE 74. Write a single Unix command using a regular expression which will search the file manifest and display lines containing plate numbers of this format which occur by itself on a line.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Filename:

Newfile.txt

File content:

32MP67 abc def etc
56PE89 hhaha jjj kkal  akk
309a56 hsd jsjd ojd osd
aaa23jj jsj dj 

Command:

cat Newfile.txt | grep [0-9][0-9][A-Z][A-Z][0-9][0-9]

OUTPUT:

32MP67 abc def etc
56PE89 hhaha jjj kkal  akk
Add a comment
Know the answer?
Add Answer to:
[UNIX] EASY QUESTION ====================================================== One type of affinity license plate in Ontario consists of the pattern...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • In Python!! 1. Correcting string errors It's easy to make errors when you're trying to type...

    In Python!! 1. Correcting string errors It's easy to make errors when you're trying to type strings quickly. Don't forget to use quotes! Without quotes, you'll get a name error. owner = DataCamp Use the same type of quotation mark. If you start with a single quote, and end with a double quote, you'll get a syntax error. fur_color = "blonde' Someone at the police station made an error when filling out the final lines of Bayes' Missing Puppy Report....

  • Unix HOMEWORK HELP!! Simple Multiple Choice.   I have answered these questions, but I want to ask...

    Unix HOMEWORK HELP!! Simple Multiple Choice.   I have answered these questions, but I want to ask online, to get second feedback and make sure I am on the right page What is the diffference bettween a willd card and a regular expression? a.) A willd carrd is the * chharacter, butt a rregular excpression caan usse morre symbols. b.) Wild cards are pattterns expandded by the shhell. A reggular expression is a pattern used by commands, internally. c.) There is...

  • This C++ Program consists of: operator overloading, as well as experience with managing dynamic memory allocation...

    This C++ Program consists of: operator overloading, as well as experience with managing dynamic memory allocation inside a class. Task One common limitation of programming languages is that the built-in types are limited to smaller finite ranges of storage. For instance, the built-in int type in C++ is 4 bytes in most systems today, allowing for about 4 billion different numbers. The regular int splits this range between positive and negative numbers, but even an unsigned int (assuming 4 bytes)...

  • could you please help me with this problem, also I need a little text so I...

    could you please help me with this problem, also I need a little text so I can understand how you solved the problem? import java.io.File; import java.util.Scanner; /** * This program lists the files in a directory specified by * the user. The user is asked to type in a directory name. * If the name entered by the user is not a directory, a * message is printed and the program ends. */ public class DirectoryList { public static...

  • Write a C program for: One technique for dealing with deadlock is called “detect and recover.” In...

    Write a C program for: One technique for dealing with deadlock is called “detect and recover.” In this scheme, some procedure is used to identify when a deadlock occurs, and then another procedure is used to deal with the blocked processes. One technique to identify a deadlock is to maintain a resource graph that identifies all processes, all resources, and the relationships between them (that is, which processes exclusively own which resources, and which processes are blocked waiting for which...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT