My Linux Learning Path
Do Linux to learn Linux. Use VIM and create a file named Id.txt with the following (CC, DNI, LIC; are Id denominations):
| Id | Name |
|---|---|
| Mauricio | CC 71.989.867 |
| Nury | CC 98.001.023 |
| Jhon | LIC 123.456.874 |
| Mike | DNI 53.721.321-X |
| Alvaro | DNI 75.342.123-S |
| Jose | LIC 453.750.884 |
Now let´s play:
- Find Persons with: CC document Id.
- Find Persons with: DNI document Id.
- Find Persons with: LIC document Id.
- Find Persons with: CC, DNI document Id.
- Find Persons with: CC, LIC document Id.
- Find Persons with: LIC, DNI document Id.
- Define a regex pattern for DNI and use it with grep to find all DNI´s.
- Define a regex pattern for LIC and use it with grep to find all LIC´s.
- Define a regex pattern for CC and use it with grep to find all CC´s.
- Another way to identify DNI Id is to find lines that end with a letter. Use regex and grep for this purpose.
- Find names with 4 and 5 letters.
- Find if any Id repeat a number 2 times.