Тёмный

RHCSA RHEL 8 - Use grep and regular expressions to analyse text 

Computers, Security & Gadgets
Подписаться 9 тыс.
Просмотров 12 тыс.
50% 1

Buy CSG Merchandise:
tee.pub/lic/csg
Patreon page: / computers_servers
This video is based on RHEL 8.
Video to cover the section 'Use grep and regular expressions to analyse text' for the RHCSA (Red Hat Certified System Administrator).
More information on the required learning: www.redhat.com...
Summary of the common regular expressions:
[ ]: Matches any one of a set characters
[ ] with hyphen: Matches any one of a range characters
^: The pattern following it must occur at the beginning of each line
^ with [ ] : The pattern must not contain any character in the set specified
$: The pattern preceding it must occur at the end of each line
. (dot): Matches any one character
\ (backslash): Ignores the special meaning of the character following it
*: Zero or more occurrences of the previous character
(dot).*: Nothing or any numbers of characters.
Commands used in this video:
[ ] : Matches any one of a set characters:
$grep "[CcFf]a[RrTt]" kafka.txt
Use [ ] with hyphen: Matches any one of a range characters:
$grep "da[a-z]" kafka.txt
$grep "da[a-i][a-z]" kafka.txt
Use ^: The pattern following it must occur at the beginning of each line:
$grep "^He" kafka.txt
Display list of directories only:
$ls -l |grep "^d"
Display list of regular files only:
$ls -l |grep "^-"
Use ^ with [ ]: The pattern must not contain any character in the set specified:
$grep "d[^a-i]e" kafka.txt
Use $: The pattern preceding it must occur at the end of each line:
$ grep "got$" kafka.txt
Use . (dot): Matches any one character:
$ grep "st..id" kafka.txt
Use \ (backslash): Ignores the special meaning of the character following it:
$ grep "out\.$" kafka.txt
$ grep "Hell\!" kafka.txt
Use *: zero or more occurrences of the previous character:
$ grep "hap*[e-z]n[a-i]d" kafka.txt
Use (dot).*: Nothing or any numbers of characters:
$ grep "hap.*ed" kafka.txt

Опубликовано:

 

8 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 19   
Далее
RHCSA RHEL 8 - Access remote systems using SSH
6:34
Просмотров 10 тыс.
RHCSA RHEL 8 - Use input-output redirection
17:51
Просмотров 15 тыс.
The Tragedy of systemd
47:18
Просмотров 1,1 млн
Become a bash scripting pro - full course
36:00
Просмотров 59 тыс.