Changes

Jump to: navigation, search

Tutorial9: Regular Expressions

288 bytes added, 10:24, 28 February 2021
INVESTIGATION 1: SIMPLE & COMPLEX REGULAR EXPRESSIONS
# Issue the following Linux pipeline command to display only whole numbers (with or without a positive or negative sign):<br><span style="color:blue;font-weight:bold;font-family:courier;">grep "^[+-]*[0-9][0-9]*$" numbers1.dat | tee all.txt</span><br><br>Did this command work?<br><br>
# Issue the following command to check that you created those hard links: <br><span style="color:blue;font-weight:bold;font-family:courier;">bash /home/murray.saul/scripts/week9-check-1</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>
 
: Although very useful, '''complex''' regular expressions do NOT entirely solve our problem of displaying only '''valid''' unsigned and signed numbers. In the next investigation, you will learn how to use '''extended''' regular expressions that will completely solve this issue.<br><br>
:Proceed to INVESTIGATION 2.
13,420
edits

Navigation menu