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
68
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Practical unix utilities for text processing
Anton Arhipov
October 01, 2010
More Decks by Anton Arhipov
See All by Anton Arhipov
Spec-Driven Development with AI-Agents: From High-Level Requirements to Working Software
antonarhipov
2
540
Spec-Driven Development with AI Agents (Workshop, May 2026)
antonarhipov
4
500
Spec-Driven Development with AI Agents. Java Day Istanbul 2026
antonarhipov
3
130
Spec-Driven Development with AI Agents: From High-Level Requirements to Working Software
antonarhipov
3
130
Strengthening Immutability in Kotlin. A Glimpse into Valhalla
antonarhipov
3
110
Kotlin—the New and Noteworthy in 2.2
antonarhipov
1
48
Levels of AI-assisted programming
antonarhipov
0
150
Devoxx France 2024. Kotlin - the new and noteworthy
antonarhipov
2
110
Harnessing the power of AI in IntelliJ IDEA
antonarhipov
1
260
Other Decks in Technology
See All in Technology
はてなのサービス基盤を支える Kubernetes《足腰》
masayoshimaezawa
0
210
フルAIで個人開発して学んだあれこれ / yuruai vol.1
isaoshimizu
0
150
感情と身体を置き去りにしない、エンジニアの生きのこり方 ──いまから、ここから「自分の状態」を扱うという選択
saorimurooka
0
390
4人目のSREはAgent
tanimuyk
0
280
打造你的 AI 工作流:Agent Skill + MCP 實戰工作坊
appleboy
0
180
AIは、人間らしい仕事の夢を見るか?─ AI時代のtoB/toEプロダクトを再設計する
techtekt
PRO
0
160
AIチャットの改善から見えた、良いAI体験とは / What Constitutes a Good AI Experience: Insights from Improving AI Chat
kubode
0
130
Microsoft のサポートとフィードバック総まとめ
murachiakira
PRO
0
120
トークン最適化のためのユーザーストーリー分析 / User Story Analysis for Token Optimization
oomatomo
0
130
コミュニティの有益性 ~JAWS Days 2026 での体験を通して~ / The Benefits of a Community ~Through My Experience at JAWS Days 2026~
seike460
PRO
0
300
飲食店もAIで。レジ締めやハンディシステムをつくってる話 / Using AI for restaurant management
vtryo
0
210
Deep Data Security 機能解説
oracle4engineer
PRO
2
230
Featured
See All Featured
YesSQL, Process and Tooling at Scale
rocio
174
15k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.3k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
400
So, you think you're a good person
axbom
PRO
2
2.1k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.4k
A better future with KSS
kneath
240
18k
HDC tutorial
michielstock
2
720
Prompt Engineering for Job Search
mfonobong
0
350
Accessibility Awareness
sabderemane
1
140
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
170
Evolving SEO for Evolving Search Engines
ryanjones
0
230
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.1k
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