utorok 10. mája 2022

Regular expressions and [ ]

 Regular expressions and [ ] 


[ ] is space for characters which you need. 






for example: 


1) we have user Ostrozub

2) grep this: 

grep -i ostrozub /etc/passwd


3) What ist the name? Ostrizub? Ostrozub? Ostrrzub? Ostrpzub?


- check this via [ ] - [i-r] ?


[i-r] matches from i to r? ... i, j, k, l, m, n, o, p, r


check this picture:



Ostrozub (o) is not matches from a to g. 





Žiadne komentáre:

Zverejnenie komentára