Grep: Skirtumas tarp puslapio versijų
Jump to navigation
Jump to search
4 eilutė: | 4 eilutė: | ||
=== Jeigu didesnis failas ir pasibaigia ramas === | === Jeigu didesnis failas ir pasibaigia ramas === | ||
− | + | Pirmiausia susortinam failus | |
− | comm -23 | + | cat file.txt | sort -u > file_sorted.txt |
+ | cat exclude.txt | sort -u > exclude_sorted.txt | ||
+ | Darom compare | ||
+ | comm -23 file_sorted.txt exclude_sorted.txt > file_clean.txt | ||
{{Template:Distributions}} | {{Template:Distributions}} | ||
[[Category:Scripts]] | [[Category:Scripts]] |
Dabartinė 13:29, 18 liepos 2019 versija
Grep exceptions from file[keisti]
grep -vf exclude.txt file.txt
Jeigu didesnis failas ir pasibaigia ramas[keisti]
Pirmiausia susortinam failus
cat file.txt | sort -u > file_sorted.txt cat exclude.txt | sort -u > exclude_sorted.txt
Darom compare
comm -23 file_sorted.txt exclude_sorted.txt > file_clean.txt