Skip to content

Commit

Permalink
Update grep.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Felipebros authored Nov 12, 2023
1 parent fd719d0 commit 7dee3b4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion grep.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,11 @@ grep -o 'prod\.ERROR.*' laravel-2023-11-01.log | less

## Gerar um arquivo de texto com as linhas únicas e ordenadas alfanumericamente
```bash
grep -o 'prod\.ERROR.*' laravel-2023-11-01.log | uniq | sort > teste.log
grep -o 'prod\.ERROR.*' laravel-2023-11-01.log | sort | uniq > teste.log
```

## Pesquisar com grep com case insensitive (sem distinção entre maiúsculas e minúsculas)
> Para ser uma linha única, sem repetição, primeiro precisa ordenar, para depois usar o programa uniq
```bash
grep -o -i 'google \w*' BrowserHistory.json | sort | uniq | less
```

0 comments on commit 7dee3b4

Please sign in to comment.