Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Practical unix utilities for text processing
Search
Anton Arhipov
October 01, 2010
Technology
0
68
Practical unix utilities for text processing
Anton Arhipov
October 01, 2010
Tweet
Share
More Decks by Anton Arhipov
See All by Anton Arhipov
Strengthening Immutability in Kotlin. A Glimpse into Valhalla
antonarhipov
2
35
Kotlin—the New and Noteworthy in 2.2
antonarhipov
1
14
Levels of AI-assisted programming
antonarhipov
0
70
Devoxx France 2024. Kotlin - the new and noteworthy
antonarhipov
2
67
Harnessing the power of AI in IntelliJ IDEA
antonarhipov
1
200
VirtualJUG: Kotlin 2.0 and beyond
antonarhipov
1
130
Kotlin 2.1: Language Updates
antonarhipov
3
170
Devoxx Belgium 2024 - Kotlin 2.0 and beyond
antonarhipov
2
180
Data Analysis with Kotlin Notebook, DataFrame, and Kandy
antonarhipov
1
110
Other Decks in Technology
See All in Technology
戰略轉變:從建構 AI 代理人到發展可擴展的技能生態系統
appleboy
0
160
AgentCore BrowserとClaude Codeスキルを活用した 『初手AI』を実現する業務自動化AIエージェント基盤
ruzia
7
2k
SQLだけでマイグレーションしたい!
makki_d
0
1.2k
ハッカソンから社内プロダクトへ AIエージェント ko☆shi 開発で学んだ4つの重要要素
leveragestech
0
390
Building Serverless AI Memory with Mastra × AWS
vvatanabe
1
760
Snowflake Industry Days 2025 Nowcast
takumimukaiyama
0
140
re:Invent2025 セッションレポ ~Spec-driven development with Kiro~
nrinetcom
PRO
1
120
なぜ あなたはそんなに re:Invent に行くのか?
miu_crescent
PRO
0
230
半年で、AIゼロ知識から AI中心開発組織の変革担当に至るまで
rfdnxbro
0
160
ECS_EKS以外の選択肢_ROSA入門_.pdf
masakiokuda
1
110
"人"が頑張るAI駆動開発
yokomachi
1
650
Kiro を用いたペアプロのススメ
taikis
4
2k
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.8k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
Color Theory Basics | Prateek | Gurzu
gurzu
0
160
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.2k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.7k
Speed Design
sergeychernyshev
33
1.4k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
720
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
130
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
0
68
The #1 spot is gone: here's how to win anyway
tamaranovitovic
1
880
Transcript
grep | sed | awk | xargs | etc
None
sed vim awk ls
cat tac head tail split wc sum sort uniq kill cut paste join tr dir mv du echo test expr tee grep
DB Mega App Files Log
GNU Coreutils http://www.gnu.org/software/coreutils/ The takeaway
command: man > info coreutils
List of files: ls –l ls –1
ls –latr find . –name *.txt
Seek for a string in a file: grep
“cat” file.txt grep –v “dog” file.txt grep –i “PaTtErN” file.txt egrep “cat|dog” file.txt zgrep “cat” file.txt.gz
for file in `find . –name *tmp` do
rm $file done find . –name *tmp | xargs rm Do something with each file:
find + grep find . -‐name '*txt' -‐exec
grep -‐l aaa {} \; find . -‐name '*txt' | xargs grep -‐l aaa
ls cat tac head tail
split wc sum sort uniq kill cut paste join tr dir mv du echo test expr tee grep
None
None
None
None
None
None
sed awk
s for substitution sed ‘s/cat/dog/’ #
cat -‐> dog sed ‘s/\(a\)\(b\)/\2\1/’ # ab -‐> ba
p for printing sed –n ‘/dog/p’
# print lines that match ‘dog’ sed –n ‘/start/,/end/p’ # print range
d to delete sed ‘/dog/d’ # delete
lines that match ‘dog’ sed ‘1,/pattern/d’ # delete range
| and –e for invocation sed ‘s/a/A/’ |
sed ‘s/b/B/’ # sed –e ‘s/a/A/’ –e ‘s/b/B/’ #
{ .. } to group the commands sed
‘/pattern/ { s/p/P/ s/e/E/ }’ #pattern -‐> PattErn
r to read a file sed ‘/include/ r
file.txt’ # insert file.txt after include w to write to a file sed ‘/pattern/ w file.txt’ # write matched lines to a file
None
aaa bbb ccc aaa bbb zzz awk
'/zzz/' 1.txt grep zzz 1.txt aaa bbb zzz
awk 'BEGIN
{<initializations>} <pattern 1> {<actions>} <pattern 2> {<actions>} ... END {<final actions>}'
awk 'BEGIN {a=0, b=0}
/aaa/ {a++} /bbb/ {b++} END {printf “%d\t%d”,a,b}'
awk '{arr[$2]+=$1} END {
for (id in arr) printf "%s\t%d\t\n",id,arr[id]}'
@antonarhipov