grep | sed | awk | xargs | etcPractical *nix utilities(for text processing)
whoami
/awkcatgreptacsedecholsdutestmvsplittaildirjoinwcheadvimtrsortsumcutexpruniqpastekilltee
/LogMega AppFilesDB
pwd | ls | find | teeGNU Coreutilshttp://www.gnu.org/software/coreutils/The takeaway command:man> info coreutils
pwd | ls | find | teeList of files:ls –lls–1ls –latrfind . –name *.txt
pwd | ls | find | teeSeek for a string in a file:grep“cat” file.txtgrep –v “dog” file.txtgrep –i “PaTtErN” file.txtegrep“cat|dog” file.txtzgrep“cat” file.txt.gz
for / xargsDo something with each file:for file in `find . –name *tmp` dorm$file donefind . –name *tmp| xargsrm
pwd | ls | find | teefind + grepfind . -name '*txt' -exec grep-l aaa{} \;find . -name '*txt' | xargsgrep-l aaa
pwd | ls | find | teecatgreptacecholsdutestmvsplittaildirjoinwcheadtrsortsumcutexpruniqpastekilltee
paste
join
sort | uniq
wc
cut
csplit
awksed
sedsfor substitutionsed‘s/cat/dog/’ # cat -> dogsed ‘s/\(a\)\(b\)/\2\1/’# ab-> ba
sedpfor printingsed –n ‘/dog/p’ # print lines that match ‘dog’sed–n ‘/start/,/end/p’# print range
seddto deletesed ‘/dog/d’# delete lines that match ‘dog’sed ‘1,/pattern/d’# delete range
sed| and –e for invocationsed ‘s/a/A/’ | sed ‘s/b/B/’#sed –e ‘s/a/A/’ –e ‘s/b/B/’ #
sed{ .. } to group the commandssed ‘/pattern/ {       s/p/P/       s/e/E/    }’#pattern -> PattErn
sedrto read a filesed ‘/include/ r file.txt’# insert file.txt after includewto write to a filesed‘/pattern/ w file.txt’# write matched lines to a file
sedtris
awkaaabbb cccaaabbbzzzawk '/zzz/'  1.txt  grepzzz    1.txtaaabbbzzz
awkawk'BEGIN{<initializations>}<pattern 1> {<actions>}<pattern 2> {<actions>}... END{<final actions>}'
awkawk'BEGIN{a=0, b=0} /aaa/{a++} /bbb/   {b++}END{printf “%d\t%d”,a,b}'
awkawk'{arr[$2]+=$1} END { for (id in arr) printf "%s\t%d\t\n",id,arr[id]}'
exit@antonarhipov

More Related Content

PPT
Unix command-line tools
PPTX
Pig workshop
ODP
Love Your Command Line
PDF
Practical pig
PDF
Semantic Pipes (London Perl Workshop 2009)
PPT
Python - Getting to the Essence - Points.com - Dave Park
PDF
What we can learn from Rebol?
PDF
KubeCon EU 2016: Custom Volume Plugins
Unix command-line tools
Pig workshop
Love Your Command Line
Practical pig
Semantic Pipes (London Perl Workshop 2009)
Python - Getting to the Essence - Points.com - Dave Park
What we can learn from Rebol?
KubeCon EU 2016: Custom Volume Plugins

What's hot (20)

PPTX
Cscope and ctags
PDF
Fast and cost effective geospatial analysis pipeline with AWS lambda
PPTX
2015 bioinformatics python_strings_wim_vancriekinge
KEY
PDF
Why Python (for Statisticians)
PDF
Course 102: Lecture 7: Simple Utilities
PPTX
Parse, scale to millions
PPT
Introduction to Perl
PPTX
Value protocols and codables
PPT
Advanced linux chapter ix-shell script
PDF
7 Common Mistakes in Go (2015)
PDF
Go初心者がGoでコマンドラインツールの作成に挑戦した話
PDF
Ansible ハンズオン on AWS - DevelopersIO 2017
PDF
JIP Pipeline System Introduction
TXT
Logrotate sh
PDF
Introduction to source{d} Engine and source{d} Lookout
KEY
My life as a beekeeper
PPTX
File handling in c language
PDF
A Python Crash Course
PPT
Rotzy - Building an iPhone Photo Sharing App on Google App Engine
Cscope and ctags
Fast and cost effective geospatial analysis pipeline with AWS lambda
2015 bioinformatics python_strings_wim_vancriekinge
Why Python (for Statisticians)
Course 102: Lecture 7: Simple Utilities
Parse, scale to millions
Introduction to Perl
Value protocols and codables
Advanced linux chapter ix-shell script
7 Common Mistakes in Go (2015)
Go初心者がGoでコマンドラインツールの作成に挑戦した話
Ansible ハンズオン on AWS - DevelopersIO 2017
JIP Pipeline System Introduction
Logrotate sh
Introduction to source{d} Engine and source{d} Lookout
My life as a beekeeper
File handling in c language
A Python Crash Course
Rotzy - Building an iPhone Photo Sharing App on Google App Engine
Ad

Viewers also liked (20)

PDF
Defeating The Network Security Infrastructure V1.0
PDF
class12_Networking2
PDF
Unix Command Line Productivity Tips
PDF
PHP Secure Programming
KEY
Sed & awk the dynamic duo
PDF
Web Application Security: Introduction to common classes of security flaws an...
PPTX
Secure SHell
PPT
Secure shell protocol
PDF
How to Setup A Pen test Lab and How to Play CTF
PDF
Web Application Security with PHP
PPT
Learning sed and awk
PPT
Practical Example of grep command in unix
PDF
Virtual Security Lab Setup - OWASP Broken Web Apps, Webgoat, & ZAP
PDF
SSH - Secure Shell
PPTX
Secure Shell(ssh)
PDF
PDF
Top 100 Linux Interview Questions and Answers 2014
ODT
RHCE FINAL Questions and Answers
PPT
Introduction to SSH
PDF
Linux Systems Performance 2016
Defeating The Network Security Infrastructure V1.0
class12_Networking2
Unix Command Line Productivity Tips
PHP Secure Programming
Sed & awk the dynamic duo
Web Application Security: Introduction to common classes of security flaws an...
Secure SHell
Secure shell protocol
How to Setup A Pen test Lab and How to Play CTF
Web Application Security with PHP
Learning sed and awk
Practical Example of grep command in unix
Virtual Security Lab Setup - OWASP Broken Web Apps, Webgoat, & ZAP
SSH - Secure Shell
Secure Shell(ssh)
Top 100 Linux Interview Questions and Answers 2014
RHCE FINAL Questions and Answers
Introduction to SSH
Linux Systems Performance 2016
Ad

Similar to Practical unix utilities for text processing (20)

DOC
Treebeard's Unix Cheat Sheet
PDF
Os lab manual
PDF
Unit 8 text processing tools
ODP
Unix tips and tricks
PDF
Workshop on command line tools - day 1
PPT
BITS: Introduction to Linux - Text manipulation tools for bioinformatics
PPT
PDF
Linux Bash Shell Cheat Sheet for Beginners
PDF
113-1_Perl_2_Linux_commands_for_beginner.pdf
PDF
Unix / Linux Command Reference
PDF
Unix commands
PDF
Unix Cheat Sheet
PDF
Unix
PDF
Unix
PPT
Unix Basics
PDF
Course 102: Lecture 3: Basic Concepts And Commands
PPT
Karkha unix shell scritping
DOCX
Directories description
Treebeard's Unix Cheat Sheet
Os lab manual
Unit 8 text processing tools
Unix tips and tricks
Workshop on command line tools - day 1
BITS: Introduction to Linux - Text manipulation tools for bioinformatics
Linux Bash Shell Cheat Sheet for Beginners
113-1_Perl_2_Linux_commands_for_beginner.pdf
Unix / Linux Command Reference
Unix commands
Unix Cheat Sheet
Unix
Unix
Unix Basics
Course 102: Lecture 3: Basic Concepts And Commands
Karkha unix shell scritping
Directories description

More from Anton Arhipov (20)

PDF
JavaZone 2022 - Building Kotlin DSL.pdf
PDF
Idiomatic kotlin
PDF
TechTrain 2019 - (Не)адекватное техническое интервью
PDF
Build pipelines with TeamCity
PDF
Build pipelines with TeamCity
PDF
Devoxx Ukraine 2018 - Kotlin DSL in under an hour
PDF
GeeCON Prague 2018 - Kotlin DSL in under an hour
PDF
Build pipelines with TeamCity and Kotlin DSL
PDF
Build pipelines with TeamCity
PDF
JavaDay Kiev 2017 - Integration testing with TestContainers
PDF
GeeCON Prague 2017 - TestContainers
PDF
JavaOne 2017 - The hitchhiker’s guide to Java class reloading
PDF
JavaOne 2017 - TestContainers: integration testing without the hassle
PDF
JavaOne 2017 - The hitchhiker’s guide to Java class reloading
PDF
JavaZone 2017 - The Hitchhiker’s guide to Java class reloading
PDF
JUG.ua 20170225 - Java bytecode instrumentation
PDF
Riga DevDays 2017 - The hitchhiker’s guide to Java class reloading
PDF
GeeCON 2017 - TestContainers. Integration testing without the hassle
PDF
JEEConf 2017 - The hitchhiker’s guide to Java class reloading
PDF
JEEConf 2017 - Having fun with Javassist
JavaZone 2022 - Building Kotlin DSL.pdf
Idiomatic kotlin
TechTrain 2019 - (Не)адекватное техническое интервью
Build pipelines with TeamCity
Build pipelines with TeamCity
Devoxx Ukraine 2018 - Kotlin DSL in under an hour
GeeCON Prague 2018 - Kotlin DSL in under an hour
Build pipelines with TeamCity and Kotlin DSL
Build pipelines with TeamCity
JavaDay Kiev 2017 - Integration testing with TestContainers
GeeCON Prague 2017 - TestContainers
JavaOne 2017 - The hitchhiker’s guide to Java class reloading
JavaOne 2017 - TestContainers: integration testing without the hassle
JavaOne 2017 - The hitchhiker’s guide to Java class reloading
JavaZone 2017 - The Hitchhiker’s guide to Java class reloading
JUG.ua 20170225 - Java bytecode instrumentation
Riga DevDays 2017 - The hitchhiker’s guide to Java class reloading
GeeCON 2017 - TestContainers. Integration testing without the hassle
JEEConf 2017 - The hitchhiker’s guide to Java class reloading
JEEConf 2017 - Having fun with Javassist

Recently uploaded (20)

PDF
UiPath Agentic Automation session 1: RPA to Agents
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PDF
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
PDF
Improvisation in detection of pomegranate leaf disease using transfer learni...
PPTX
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION
PDF
Developing a website for English-speaking practice to English as a foreign la...
PDF
Enhancing plagiarism detection using data pre-processing and machine learning...
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PPTX
The various Industrial Revolutions .pptx
PPTX
Build Your First AI Agent with UiPath.pptx
PDF
Convolutional neural network based encoder-decoder for efficient real-time ob...
PDF
How IoT Sensor Integration in 2025 is Transforming Industries Worldwide
PDF
Consumable AI The What, Why & How for Small Teams.pdf
PDF
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
PPTX
TEXTILE technology diploma scope and career opportunities
PPTX
Custom Battery Pack Design Considerations for Performance and Safety
PPTX
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
Credit Without Borders: AI and Financial Inclusion in Bangladesh
PDF
Five Habits of High-Impact Board Members
UiPath Agentic Automation session 1: RPA to Agents
A contest of sentiment analysis: k-nearest neighbor versus neural network
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
Improvisation in detection of pomegranate leaf disease using transfer learni...
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION
Developing a website for English-speaking practice to English as a foreign la...
Enhancing plagiarism detection using data pre-processing and machine learning...
sustainability-14-14877-v2.pddhzftheheeeee
The various Industrial Revolutions .pptx
Build Your First AI Agent with UiPath.pptx
Convolutional neural network based encoder-decoder for efficient real-time ob...
How IoT Sensor Integration in 2025 is Transforming Industries Worldwide
Consumable AI The What, Why & How for Small Teams.pdf
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
TEXTILE technology diploma scope and career opportunities
Custom Battery Pack Design Considerations for Performance and Safety
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
NewMind AI Weekly Chronicles – August ’25 Week III
Credit Without Borders: AI and Financial Inclusion in Bangladesh
Five Habits of High-Impact Board Members

Practical unix utilities for text processing