Changes

Jump to: navigation, search

Tutorial9: Regular Expressions

83 bytes added, 14:15, 27 February 2021
INVESTIGATION 2: EXTENDED REGULAR EXPRESSIONS
# Reissue the previous pipeline command including a space in brackets:<br><span style="color:blue;font-weight:bold;font-family:courier;">egrep -i "(the ){2,}" words.dat | tee word-search2.txt</span><br><br>The "|" (or) symbol can be used within the grouping symbols to allow matching of additional groups of characters.<br>Again, it is important to follow the character groupings with the space character<br><br>
# Issue the following linux pipeline command to search for 2 or more occurrences of the word "'''the'''" <u>or</u> the word "'''and'''":<br><span style="color:blue;font-weight:bold;font-family:courier;">egrep -i "(the |and ){2,}" words.dat | tee word-search3.txt</span><br><br>
# Issue the following Linux command to check that you created correctly issued<br>those hard links''Linux pipeline commands'' using the '''tee''' command to create those text files: <br><span style="color:blue;font-weight:bold;font-family:courier;">bash /home/murray.saul/scripts/week9-check-3</span><br><br>If you encounter errors, then view the feedback to make corrections, and then re-run the checking script.<br>If you receive a congratulation message that there are no errors, then proceed with this tutorial.<br><br>
:Proceed to Investigation INVESTIGATION 3
=INVESTIGATION 3: OTHER COMMANDS THAT USE REGULAR EXPRESSIONS =
13,420
edits

Navigation menu