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
81
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
650
Spec-Driven Development with AI Agents (Workshop, May 2026)
antonarhipov
4
570
Spec-Driven Development with AI Agents. Java Day Istanbul 2026
antonarhipov
3
150
Spec-Driven Development with AI Agents: From High-Level Requirements to Working Software
antonarhipov
3
180
Strengthening Immutability in Kotlin. A Glimpse into Valhalla
antonarhipov
3
120
Kotlin—the New and Noteworthy in 2.2
antonarhipov
1
58
Levels of AI-assisted programming
antonarhipov
0
180
Devoxx France 2024. Kotlin - the new and noteworthy
antonarhipov
2
120
Harnessing the power of AI in IntelliJ IDEA
antonarhipov
1
270
Other Decks in Technology
See All in Technology
現場に行くだけでは足りない——プロダクトエンジニアが業務の流れを捉える観点と、その鍛え方
takumiengineering
0
310
KAEN Company Deck
kaen
PRO
0
320
Kiro Crewしか勝たん!?
miu_crescent
PRO
0
180
Nav2、Nav3 ... はたまた自作?〜 作って理解する Nav3 の設計意図 〜 / Nav2, Nav3 ... or Build Your Own? — Understanding Nav3's design intent by building it from scratch
yanzm
0
250
Amazon S3 Tablesに全部任せてみた結果——コンパクション/スナップショット管理は本当に手放せるか
shigeruoda
0
410
ペアプロの価値はコードを書くことだけじゃない
codmoninc
PRO
0
120
はじめてのDatabricks:技術者向けワークショップ / beginner-workshop
databricksjapan
PRO
0
230
多摩川(.dev)ランニング入門 / Tamagawa.dev#3
fujiwara3
3
390
Bet AI Day 2026丨How We Bet AI: AIとともに働く場をつくる
layerx
PRO
2
2.7k
2026/09/10 Spring_Bootから_Jakarta_EE_MicroProfileへの移行
megascus
0
150
薬剤師(ドメインエキスパート)と一緒に育てる薬局向けAIアシスタント
kakehashi
PRO
2
110
WAF 運用改善の承認サイクル/SRE_BizReach_MIXI_1
visional_engineering_and_design
1
320
Featured
See All Featured
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
Optimizing for Happiness
mojombo
378
71k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6.1k
Code Reviewing Like a Champion
maltzj
528
40k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
380
Automating Front-end Workflow
addyosmani
1369
210k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
410
Making the Leap to Tech Lead
cromwellryan
135
10k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2.7k
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