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
460
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.6k
awkでつくってわかるWebアプリケーション / Web Application Implementation in awk
yammerjp
14
8.2k
jpro: JSON Processor
yammerjp
0
510
クイズを作ってPHPに親しむ / Make quizzes and get familiar with PHP
yammerjp
2
1.5k
dotfilesを管理しよう / get-started-with-dotfiles-management
yammerjp
0
1.1k
比較演算を壊してみる / php-break-comparison
yammerjp
1
1.1k
切り取り方を工夫してアプリケーションを漸進的に改善する / Incremental improvement by devising application change boundaries
yammerjp
1
1.7k
社用PCのdotfiles管理 / dotfiles-in-company
yammerjp
1
2.4k
開発チームの新しいエンジニアメンバーがうまくやるには / newcomer-in-development-team
yammerjp
0
1.7k
Other Decks in Programming
See All in Programming
The rollercoaster of releasing an Android, iOS, and macOS app with Kotlin Multiplatform | droidcon Italy
prof18
0
150
layerx_20241129.pdf
kyoheig3
2
290
Jakarta EE meets AI
ivargrimstad
0
230
Scalaから始めるOpenFeature入門 / Scalaわいわい勉強会 #4
arthur1
1
300
Асинхронность неизбежна: как мы проектировали сервис уведомлений
lamodatech
0
630
急成長期の品質とスピードを両立するフロントエンド技術基盤
soarteclab
0
920
nekko cloudにおけるProxmox VE利用事例
irumaru
3
420
バグを見つけた?それAppleに直してもらおう!
uetyo
0
170
採用事例の少ないSvelteを選んだ理由と それを正解にするためにやっていること
oekazuma
2
1k
useSyncExternalStoreを使いまくる
ssssota
6
1k
これが俺の”自分戦略” プロセスを楽しんでいこう! - Developers CAREER Boost 2024
niftycorp
PRO
0
190
103 Early Hints
sugi_0000
1
220
Featured
See All Featured
Designing Experiences People Love
moore
138
23k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.9k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
18k
The World Runs on Bad Software
bkeepers
PRO
65
11k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
2
160
[RailsConf 2023] Rails as a piece of cake
palkan
53
5k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
48
2.2k
The Language of Interfaces
destraynor
154
24k
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Λͨͷ͠͏