Changes

Jump to: navigation, search

Tutorial9: Regular Expressions

76 bytes added, 08:18, 8 July 2020
INVESTIGATION 3: OTHER COMMANDS THAT USE REGULAR EXPRESSIONS
# Press the letter <span style="color:blue;font-weight:bold;font-family:courier;">q</span> to exit the man pages for '''ls'''.<br><br>
#Let's use regular expressions with the '''more''' command.<br>Issue the following linux command to view the contents of the '''textfile1.txt''' (downloaded in a previous section):<br><span style="color:blue;font-weight:bold;font-family:courier;">more textfile1.txt</span><br><br>
#We want to Issue search for a pattern '''uli101''' within this text file.<br>Type the following linux commandregular expression and press ENTER:<br><span style="color:blue;font-weight:bold;font-family:courier;">wget <nowiki>https://ict.senecacollege.ca/~murray.saul/uli101</textfile1.txtspan></nowikibr></spanbr>What did you notice?<br><br>#Issue Search for the following linux commandnext occurrence of the pattern '''uli101''' by issuing:<br><span style="color:blue;font-weight:bold;font-family:courier;">wget <nowiki>https://ict.senecacollege.ca/~murray.saul/uli101</textfile1.txtspan></nowikibr></spanbr>you should now see the second occurrence of this pattern within the text file.<br><br>
#Issue the following linux command:<br><span style="color:blue;font-weight:bold;font-family:courier;">wget <nowiki>https://ict.senecacollege.ca/~murray.saul/uli101/textfile1.txt</nowiki></span><br><br>
13,420
edits

Navigation menu