December 1999
Beginner
528 pages
11h 10m
English
You can match any single character with a ‘.’ For example if we wanted to match a string that started with beg followed by any character and ended with an n,we could use beg.n. This would match begin and began amongst others.
We could also use it to match certain permissions from a ls -l command.
...x..x..x
This would match all the execute permissions for owner, group and other:
drwxrwxrw- – no match -rw-rw-rw- – no match -rwx-rwxr-x – match -rwx-r-x-r-x – match
Suppose you are filtering a text file, and you need to match all codes with an XC after the first four characters within a 10-character field. This would do it:
....XC....
What we have said in the above example is that the first ...
Read now
Unlock full access