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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Anton Arhipov
October 01, 2010
Technology
68
0
Share
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
43
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
94
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
200
Devoxx Belgium 2024 - Kotlin 2.0 and beyond
antonarhipov
2
200
Other Decks in Technology
See All in Technology
20260326_AIDD事例紹介_ULSC.pdf
findy_eventslides
0
290
GitHub Actions侵害 — 相次ぐ事例を振り返り、次なる脅威に備える
flatt_security
12
7.1k
Oracle AI Database@Azure:サービス概要のご紹介
oracle4engineer
PRO
4
1.3k
GitHub Advanced Security × Defender for Cloudで開発とSecOpsのサイロを超える: コードとクラウドをつなぐ、開発プラットフォームのセキュリティ
yuriemori
1
120
Datadog で実現するセキュリティ対策 ~オブザーバビリティとセキュリティを 一緒にやると何がいいのか~
a2ush
0
180
RGBに陥らないために -プロダクトの価値を届けるまで-
righttouch
PRO
0
130
Databricks Appsで実現する社内向けAIアプリ開発の効率化
r_miura
0
220
AI時代のシステム開発者の仕事_20260328
sengtor
0
320
AIエージェント勉強会第3回 エージェンティックAIの時代がやってきた
ymiya55
0
180
「活動」は激変する。「ベース」は変わらない ~ 4つの軸で捉える_AI時代ソフトウェア開発マネジメント
sentokun
0
140
自分をひらくと次のチャレンジの敷居が下がる
sudoakiy
4
1.3k
Tour of Agent Protocols: MCP, A2A, AG-UI, A2UI with ADK
meteatamel
0
170
Featured
See All Featured
Mobile First: as difficult as doing things right
swwweet
225
10k
Designing Powerful Visuals for Engaging Learning
tmiket
1
320
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
330
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
340
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.3k
Automating Front-end Workflow
addyosmani
1370
200k
The Pragmatic Product Professional
lauravandoore
37
7.2k
KATA
mclloyd
PRO
35
15k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
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