DEVOPSITSEC Telegram 1815
🛠 4 утилиты для работы с текстом в терминале

Когда работаешь с логами в ход обычно идут grep и awk. Но есть и другие инструменты, которые спасают не меньше:

tr — заменяет или убирает символы:

cat names.txt | tr '[:lower:]' '[:upper:]'

Команда превратит весь текст в CAPS LOCK.

sort — сортирует строки:

cat errors.log | sort

Хаос превращается в аккуратный список.

uniq — убирает дубликаты:

cat users.txt | sort | uniq


nl — нумерует строки:

cat config.yaml | nl

Удобно искать по номерам, а не на глаз.

Вместе они превращают любой текстовый файл в данные, с которыми приятно работать.

Например:

cat access.log | cut -d' ' -f1 | sort | uniq -c | sort -nr | nl | head


Топ-10 IP-адресов по количеству запросов, с нумерацией.
7👍6🔥3



tgoop.com/DevOPSitsec/1815
Create:
Last Update:

🛠 4 утилиты для работы с текстом в терминале

Когда работаешь с логами в ход обычно идут grep и awk. Но есть и другие инструменты, которые спасают не меньше:

tr — заменяет или убирает символы:


cat names.txt | tr '[:lower:]' '[:upper:]'

Команда превратит весь текст в CAPS LOCK.

sort — сортирует строки:

cat errors.log | sort

Хаос превращается в аккуратный список.

uniq — убирает дубликаты:

cat users.txt | sort | uniq


nl — нумерует строки:

cat config.yaml | nl

Удобно искать по номерам, а не на глаз.

Вместе они превращают любой текстовый файл в данные, с которыми приятно работать.

Например:

cat access.log | cut -d' ' -f1 | sort | uniq -c | sort -nr | nl | head


Топ-10 IP-адресов по количеству запросов, с нумерацией.

BY DevOps


Share with your friend now:
tgoop.com/DevOPSitsec/1815

View MORE
Open in Telegram


Telegram News

Date: |

Although some crypto traders have moved toward screaming as a coping mechanism, several mental health experts call this therapy a pseudoscience. The crypto community finds its way to engage in one or the other way and share its feelings with other fellow members. Public channels are public to the internet, regardless of whether or not they are subscribed. A public channel is displayed in search results and has a short address (link). Ng was convicted in April for conspiracy to incite a riot, public nuisance, arson, criminal damage, manufacturing of explosives, administering poison and wounding with intent to do grievous bodily harm between October 2019 and June 2020. In 2018, Telegram’s audience reached 200 million people, with 500,000 new users joining the messenger every day. It was launched for iOS on 14 August 2013 and Android on 20 October 2013. The imprisonment came as Telegram said it was "surprised" by claims that privacy commissioner Ada Chung Lai-ling is seeking to block the messaging app due to doxxing content targeting police and politicians.
from us


Telegram DevOps
FROM American