Question

LINUX ubuntu please. Please show the result's screenshot. Thanks in advanced. Using the regular expression rules...

LINUX ubuntu please. Please show the result's screenshot. Thanks in advanced.

Using the regular expression rules create grep commands that locate the following lines in /etc/services:

All lines that contain the string smtp.

All lines that begin with the string smtp.

All lines that include periods (dots, .)

All lines that include the string ftp except when that string is followed immediately by a dash (-).

All lines in which the letter a follows the letter z.

All lines that include the string https or http-, but not those that include http followed by any other character.

All lines that end with a hash mark (#)

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

sh-4.4$ grep -i smtp /home/cg/root/abc/* abc smtp xyz smtp started with sh-4.4$ grep -w smtp /home/cg/root/abc/* smtp star

grep -i 'smtp' *
grep -w '^smtp' *
grep -F '.' *
grep -v 'ftp-' * | grep 'ftp'
grep 'az' *
grep 'https\|http-' *
grep -E '#' *

let me know if this is as expected

Add a comment
Know the answer?
Add Answer to:
LINUX ubuntu please. Please show the result's screenshot. Thanks in advanced. Using the regular expression rules...
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
  • Regular Expression processor in Java Overview: Create a Java program that will accept a regular expression...

    Regular Expression processor in Java Overview: Create a Java program that will accept a regular expression and a filename for a text file. The program will process the file, looking at every line to find matches for the regular expression and display them. Regular Expression Format The following operators are required to be accepted: + - one or more of the following character (no groups) * - zero or more of the following character (no groups) [] – no negation,...

  • C linux please write it by only using “if and else” conditions, thanks so much this...

    C linux please write it by only using “if and else” conditions, thanks so much this is my task 3 Requirements 1. Copy your solution for Task 3 t3.c to a new file t4.c. 2. The input is guaranteed to contain at least one non-whitespace character. 3. If the input is well-formed, i.e., can be parsed to a number, the program should behave identically to Task 3. All the requirements of Task 3 still apply except the file name. 4....

  • Overview: The goal of this assignment is to implement a simple spell checker using a hash...

    Overview: The goal of this assignment is to implement a simple spell checker using a hash table. You will be given the basic guidelines for your implementation, but other than that you are free to determine and implement the exact classes and methods that you might need. Your spell-checker will be reading from two input files. The first file is a dictionary containing one word per line. The program should read the dictionary and insert the words into a hash...

  • Please write this in Java, please write comments as you create it, and please follow the...

    Please write this in Java, please write comments as you create it, and please follow the coding instructions. As you are working on this project, add print statements or use the debugger to help you verify what is happening. Write and test the project one line at a time. Before you try to obtain currency exchange rates, obtain your free 32 character access code from this website: https://fixer.io/ Here's the code: 46f27e9668fcdde486f016eee24c554c Choose five international source currencies to monitor. Each...

  • For a C program hangman game: Create the function int play_game [play_game ( Game *g )]...

    For a C program hangman game: Create the function int play_game [play_game ( Game *g )] for a C program hangman game. (The existing code for other functions and the program is below, along with what the function needs to do) (Also the link to program files (hangman.h and library file) is below the existing code section. You can use that to check if the code works) What int play_game needs to do mostly involves calling other functions you've already...

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