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
340
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.3k
awkでつくってわかるWebアプリケーション / Web Application Implementation in awk
yammerjp
12
7.4k
jpro: JSON Processor
yammerjp
0
400
クイズを作ってPHPに親しむ / Make quizzes and get familiar with PHP
yammerjp
2
1.3k
dotfilesを管理しよう / get-started-with-dotfiles-management
yammerjp
0
900
比較演算を壊してみる / php-break-comparison
yammerjp
1
940
切り取り方を工夫してアプリケーションを漸進的に改善する / Incremental improvement by devising application change boundaries
yammerjp
1
1.5k
社用PCのdotfiles管理 / dotfiles-in-company
yammerjp
1
2.2k
開発チームの新しいエンジニアメンバーがうまくやるには / newcomer-in-development-team
yammerjp
0
1.6k
Other Decks in Programming
See All in Programming
実践 Advanced CallKit 〜快適な通話の実現に向けて〜
mot_techtalk
3
110
Hono・Prisma・AWSでGeoなAPI開発
nokonoko1203
5
610
Regular Expressions, REXML, Automata Learning
makenowjust
0
180
詳解UIWindow
natmark
3
2k
null or undefined
susisu
20
4k
どうしてこうなった?から理解するActive Recordの関連の裏側
willnet
5
510
Ruby Parser progress report 2024
yui_knk
2
180
Desafios e Lições Aprendidas na Migração de Monólitos para Microsserviços em Java
jessilyneh
2
130
iOSDC 2024
auramagi
3
590
RAGの回答精度評価用のQAデータセットを生成AIに作らせた話
kurahara
0
210
Swiftコードバトル必勝法
toshi0383
0
140
Rustではじめる負荷試験
skanehira
5
1.1k
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
65
9.7k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
22
580
Product Roadmaps are Hard
iamctodd
PRO
48
10k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.4k
Mobile First: as difficult as doing things right
swwweet
220
8.8k
How to train your dragon (web standard)
notwaldorf
85
5.6k
Gamification - CAS2011
davidbonilla
79
4.9k
Building an army of robots
kneath
302
42k
Done Done
chrislema
180
16k
Become a Pro
speakerdeck
PRO
22
4.8k
Designing on Purpose - Digital PM Summit 2013
jponch
113
6.8k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
363
22k
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Λͨͷ͠͏