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
480
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.5k
jpro: JSON Processor
yammerjp
0
530
クイズを作ってPHPに親しむ / Make quizzes and get familiar with PHP
yammerjp
2
1.5k
dotfilesを管理しよう / get-started-with-dotfiles-management
yammerjp
0
1.2k
比較演算を壊してみる / 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.8k
Other Decks in Programming
See All in Programming
はてなにおけるfujiwara-wareの活用やecspressoのCI/CD構成 / Fujiwara Tech Conference 2025
cohalz
3
2.8k
rails newと同時に型を書く
aki19035vc
5
710
KMP와 kotlinx.rpc로 서버와 클라이언트 동기화
kwakeuijin
0
300
Alba: Why, How and What's So Interesting
okuramasafumi
0
210
.NETでOBS Studio操作してみたけど…… / Operating OBS Studio by .NET
skasweb
0
120
技術的負債と向き合うカイゼン活動を1年続けて分かった "持続可能" なプロダクト開発
yuichiro_serita
0
300
カンファレンス動画鑑賞会のススメ / Osaka.swift #1
hironytic
0
170
Beyond ORM
77web
11
1.6k
EC2からECSへ 念願のコンテナ移行と巨大レガシーPHPアプリケーションの再構築
sumiyae
3
590
Swiftコンパイラ超入門+async関数の仕組み
shiz
0
170
Scaling your build logic
antalmonori
1
100
PSR-15 はあなたのための ものではない? - phpcon2024
myamagishi
0
410
Featured
See All Featured
A designer walks into a library…
pauljervisheath
205
24k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Navigating Team Friction
lara
183
15k
Building Your Own Lightsaber
phodgson
104
6.2k
Unsuck your backbone
ammeep
669
57k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
Documentation Writing (for coders)
carmenintech
67
4.5k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Faster Mobile Websites
deanohume
305
30k
We Have a Design System, Now What?
morganepeng
51
7.3k
Thoughts on Productivity
jonyablonski
68
4.4k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
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Λͨͷ͠͏