Welcome to the Cisco Academy for Vision Impaired Linux Wiki. |
Main /
RegularExpressionExercise1Regular expression exerciseThis exercise is due in a week from when it is received. Regular expressions are a handy skill to have not only under Linux but under other operating systems when data needs to be searched and manipulated.
There is an excellent website on regular expressions at We'll need some text in a file to play with. You can put this in with cat, nano ed or whatever. Careful cutting and pasting if you go this route you may get unintended characters in your file. If you call it party.txt winscp will do the conversions of line endings for you or you can use flip -u once the flip package is installed. Here is the text: Now is the time a frog and a dog sat on a log. You should use ed or sed to run the following exercises, grep can be used for the read-only tests. Give the patterns to achieve the following:
s/.ag/.og/g
show hidden files in your home directory like .bash_profile?
TOday the premier stated that he would not stand for the changes to the act. HE said that if JErry wanted to change the system he should go through due process. People have complainned about Hannah's articles and she is at risk of loosing her job. Can you design an expression to catch more than one uppercase letter followed by lowercase ones?
|