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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
Spec-Driven Development with AI Agents: From High-Level Requirements to Working Software
antonarhipov
2
33
Strengthening Immutability in Kotlin. A Glimpse into Valhalla
antonarhipov
2
74
Kotlin—the New and Noteworthy in 2.2
antonarhipov
1
32
Levels of AI-assisted programming
antonarhipov
0
110
Devoxx France 2024. Kotlin - the new and noteworthy
antonarhipov
2
92
Harnessing the power of AI in IntelliJ IDEA
antonarhipov
1
230
VirtualJUG: Kotlin 2.0 and beyond
antonarhipov
1
160
Kotlin 2.1: Language Updates
antonarhipov
3
190
Devoxx Belgium 2024 - Kotlin 2.0 and beyond
antonarhipov
2
190
Other Decks in Technology
See All in Technology
Bill One 開発エンジニア 紹介資料
sansan33
PRO
5
18k
スピンアウト講座04_ルーティン処理
overflowinc
0
1.2k
俺の/私の最強アーキテクチャ決定戦開催 ― チームで新しいアーキテクチャに適合していくために / 20260322 Naoki Takahashi
shift_evolve
PRO
1
440
形式手法特論:SMT ソルバで解く認可ポリシの静的解析 #kernelvm / Kernel VM Study Tsukuba No3
ytaka23
1
790
開発チームとQAエンジニアの新しい協業モデル -年末調整開発チームで実践する【QAリード施策】-
kaomi_wombat
0
240
Embeddings : Symfony AI en pratique
lyrixx
0
280
Kubernetesの「隠れメモリ消費」によるNode共倒れと、Request適正化という処方箋
g0xu
0
120
Phase06_ClaudeCode実践
overflowinc
0
2k
Phase01_AI座学_基礎
overflowinc
0
3.9k
The Rise of Browser Automation: AI-Powered Web Interaction in 2026
marcthompson_seo
0
310
SaaSに宿る21g
kanyamaguc
2
160
AI時代のオンプレ-クラウドキャリアチェンジ考
yuu0w0yuu
0
230
Featured
See All Featured
Game over? The fight for quality and originality in the time of robots
wayneb77
1
150
Color Theory Basics | Prateek | Gurzu
gurzu
0
260
The SEO identity crisis: Don't let AI make you average
varn
0
420
Site-Speed That Sticks
csswizardry
13
1.1k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.5k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
160
Technical Leadership for Architectural Decision Making
baasie
3
300
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
300
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
460
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
120
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.1k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
130
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