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
awk basics
Search
yammerjp
May 22, 2023
Programming
1
430
awk basics
awkの使い方を紹介します。
競プロもくもくわいわい会 2023/05/22
yammerjp
May 22, 2023
Tweet
Share
More Decks by yammerjp
See All by yammerjp
生成AIとの対話から、概念をみつけ、名前をつける / Name it with generative AI
yammerjp
2
1.5k
awkでつくってわかるWebアプリケーション / Web Application Implementation in awk
yammerjp
14
8k
jpro: JSON Processor
yammerjp
0
490
クイズを作ってPHPに親しむ / Make quizzes and get familiar with PHP
yammerjp
2
1.4k
dotfilesを管理しよう / get-started-with-dotfiles-management
yammerjp
0
1.1k
比較演算を壊してみる / php-break-comparison
yammerjp
1
1k
切り取り方を工夫してアプリケーションを漸進的に改善する / Incremental improvement by devising application change boundaries
yammerjp
1
1.7k
社用PCのdotfiles管理 / dotfiles-in-company
yammerjp
1
2.3k
開発チームの新しいエンジニアメンバーがうまくやるには / newcomer-in-development-team
yammerjp
0
1.7k
Other Decks in Programming
See All in Programming
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
1
100
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
330
Contemporary Test Cases
maaretp
0
130
Amazon Bedrock Agentsを用いてアプリ開発してみた!
har1101
0
330
Flutterを言い訳にしない!アプリの使い心地改善テクニック5選🔥
kno3a87
1
150
シェーダーで魅せるMapLibreの動的ラスタータイル
satoshi7190
1
480
見せてあげますよ、「本物のLaravel批判」ってやつを。
77web
7
7.7k
「今のプロジェクトいろいろ大変なんですよ、app/services とかもあって……」/After Kaigi on Rails 2024 LT Night
junk0612
5
2.1k
Outline View in SwiftUI
1024jp
1
320
Duckdb-Wasmでローカルダッシュボードを作ってみた
nkforwork
0
120
初めてDefinitelyTypedにPRを出した話
syumai
0
400
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
230
Featured
See All Featured
Typedesign – Prime Four
hannesfritz
40
2.4k
Designing on Purpose - Digital PM Summit 2013
jponch
115
7k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
What's in a price? How to price your products and services
michaelherold
243
12k
RailsConf 2023
tenderlove
29
900
What's new in Ruby 2.0
geeforr
343
31k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
YesSQL, Process and Tooling at Scale
rocio
169
14k
Building Your Own Lightsaber
phodgson
103
6.1k
Documentation Writing (for coders)
carmenintech
65
4.4k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
Music & Morning Musume
bryan
46
6.2k
Transcript
தࢁܚ༞ Μ·ʔ BXLCBTJDT ڝϓϩ͘͘Θ͍Θ͍ձ
தࢁܚ༞ w ৬ۀ8FCΞϓϦέʔγϣϯ ΤϯδχΞ ʙ w झຯEPU fi MFTͷཧ
w झຯBXLΛॻ͘͜ͱ w 5XJUUFS(JU)VCZBNNFSKQ Μ·ʔ
BXL ςΩετॲཧʹಛԽͨ͠ϓϩάϥϛϯάݴޠ
BXL ඪ४ೖྗΛѻ͏ͷ͕ಘҙ
BXL ڝٕϓϩάϥϛϯάΓ͍͢
࣮༻తͳBXLͷ͍ํ
ྫBQBDIFͷΞΫηεϩά͔Β*1ΞυϨεΛൈ͖ग़͢ ʜۭന۠Γͷ൪ͷϑΟʔϧυ
ྫBQBDIFͷΞΫηεϩά͔Β*1ΞυϨεΛൈ͖ग़͢ ʜۭന۠Γͷ൪ͷϑΟʔϧυ cat access.log | awk ‘{ print $1
}’ | head -3 ʜۭന۠Γͷ൪ͷϑΟʔϧυ
BXLͷϢʔεέʔεͷҎ্͜Ε ӕͩͱࢥͬͨ͋ͳͨɺ4MBDLΛʮBXLʯͰݕࡧͯ͠ΈΔͱ͍͍Ͱ͢
BXLͷॻ͖ํ
جຊจ๏ ɹɹɹɹɹɹɹɹɹύλʔϯ\ΞΫγϣϯ^ ɾύλʔϯ͕Ұக͢ΔߦʹɺΞΫγϣϯΛ࣮ߦ ɾύλʔϯΛলུ͢Δʜਅ શߦʹΞΫγϣϯΛద༻ ɾΞΫγϣϯΛলུ͢Δʜ\QSJOU^ ߦશମΛग़ྗ
ಛघͳม ඪ४ೖྗͷߦશମ ʜۭന۠ΓͷO൪ͷϑΟʔϧυ /'ϑΟʔϧυ /3ݱࡏͷߦ൪߸
<4FQ >(&5XQ DBU)551ʜུ <4FQ >(&5TDSJQUJOHKBWBIUNMʜུ <4FQ >(&5XQ TSBTQCFSSZ Qʜུ
/' /3 ಛघͳม
<4FQ >(&5XQ DBU)551ʜུ <4FQ >(&5TDSJQUJOHKBWBIUNMʜུ <4FQ >(&5XQ TSBTQCFSSZ Qʜུ
/' /3 ಛघͳม
<4FQ >(&5XQ DBU)551ʜུ <4FQ >(&5TDSJQUJOHKBWBIUNMʜུ <4FQ >(&5XQ TSBTQCFSSZ Qʜུ
/' /3 ಛघͳม
ྫߦͷ*1ΞυϨεΛग़ྗ NR==33 { print $1 }
ྫ֤ߦͷۮྻͷϑΟʔϧυΛग़ྗ { for(i=1; i<=NF; i++) { if(i%2==0) {
if(i!=1) { printf(“ “) } printf(“%s”, $i) } } printf(“\n”) } IUUQTHJTUHJUIVCDPNZBNNFSKQEECBBFGCEFDEB
ྫ"#$ $0=$(gsub(_,FS)/2) ɾʮʹೖ͢Δʯͱ͍͏ύλʔϯ㱺ਅ ɾਅͳͷͰɺΛग़ྗ ˠʮQSJOUʯͱॻ͘ͱ͜ΖΛɺʮʯͱॻ͍ͯจࣈઅ IUUQTHJTUHJUIVCDPNZBNNFSKQDEBCFCGEDG
εϥΠυதͷBDDFTTMPHɺॻ੶ʮϚελϦϯά-JOVYγΣϧεΫϦϓτʯͷαϯϓϧίʔυΛ༻͍ͯ͠·͢ IUUQTHJUIVCDPNPSFJMMZKBQBONBTUFSJOHMJOVYTIFMMTDSJQUJOHFKBCMPCNBJODIBDDFTTMPH
BXLΛͨͷ͠͏