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
20140529_nanapistudy_vol2_pub.pdf
Search
wadap
May 29, 2014
Technology
1
2.9k
20140529_nanapistudy_vol2_pub.pdf
wadap
May 29, 2014
Tweet
Share
More Decks by wadap
See All by wadap
20200311_コネヒト_リモートワークを支える文化
wadap
2
2.5k
副業が難しいと思う理由
wadap
3
590
2016-11-10_chuo_university
wadap
2
3.8k
how_to_survive.pdf
wadap
0
100
how_to_choose_technology
wadap
7
4.2k
nanapiの会社風土と文化づくり
wadap
2
23k
20140826_nanapi_engineer_culture_pub.pdf
wadap
2
130
nanapiの開発現場をどのようにして回しているか
wadap
40
11k
nanapi TechBlog
wadap
1
6.9k
Other Decks in Technology
See All in Technology
急成長中のWINTICKETにおける品質と開発スピードと向き合ったQA戦略と今後の展望 / winticket-autify
cyberagentdevelopers
PRO
1
160
生成AIの強みと弱みを理解して、生成AIがもたらすパワーをプロダクトの価値へ繋げるために実践したこと / advance-ai-generating
cyberagentdevelopers
PRO
1
180
Gradle: The Build System That Loves To Hate You
aurimas
2
150
CyberAgent 生成AI Deep Dive with Amazon Web Services / genai-aws
cyberagentdevelopers
PRO
1
480
Amazon_CloudWatch_ログ異常検出_導入ガイド
tsujiba
4
1.6k
IaC運用を楽にするためにCDK Pipelinesを導入したけど、思い通りにいかなかった話
smt7174
1
110
現地でMeet Upをやる場合の注意点〜反省点を添えて〜
shotashiratori
0
530
[AWS JAPAN 生成AIハッカソン] Dialog の紹介
yoshimi0227
0
150
「最高のチューニング」をしないために / hack@delta 24.10
fujiwara3
21
3.5k
신뢰할 수 있는 AI 검색 엔진을 만들기 위한 Liner의 여정
huffon
0
360
Forget efficiency – Become more productive without the stress
ufried
0
150
チームを主語にしてみる / Making "Team" the Subject
ar_tama
4
310
Featured
See All Featured
A designer walks into a library…
pauljervisheath
202
24k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
41
2.1k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.8k
Writing Fast Ruby
sferik
626
61k
Product Roadmaps are Hard
iamctodd
PRO
48
10k
Code Review Best Practice
trishagee
64
17k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
92
16k
Visualization
eitanlees
144
15k
Designing on Purpose - Digital PM Summit 2013
jponch
115
6.9k
Building Better People: How to give real-time feedback that sticks.
wjessup
363
19k
Building Your Own Lightsaber
phodgson
102
6.1k
Happy Clients
brianwarren
97
6.7k
Transcript
nanapi ษڧձ vol2 - Shellษڧձ - nanapi CTO Shuichi Wada
/ @wadap
• ࣮·ͩ2ճΊͷnanapiओ࠵ ͷษڧձͰ͢ • ಛʹςʔϚͳ͘ɺͦͷ࣌ʹ ڵຯ͋Δ͜ͱͰΓ·͢ • લճ։ൃڥʹ͍ͭͯ͢ ͷΛΓ·ͨ͠ nanapiษڧձͱʁ
ࣗݾհ • ాमҰ / @wadap • 1981ੜ·Ε • גࣜձࣾnanapi Co-Founderʢڞಉۀऀʣ
औక ࣥߦһ CTO • αʔόΠϯϑϥʙαʔόαΠυ։ൃ͕ಘҙ • ݱࡏͰΠϯϑϥपΓͷϝΠϯΤϯδχΞ
ຊͷςʔϚ
None
λʔήοτ • γΣϧૢ࡞ΛݟΒΕͯɺޙΖͷਓʹ͔ͭΕͨਓ • ͍ͭͷۀΛΑΓ͘ɺޮΑ࣮͘ߦ͍ͨ͠ਓ • γΣϧͷૢ࡞ʹࣗ৴͕ͳ͍ਓ
ͲΜͳ৬छʁ • ։ൃͷԆઢͰUnix/Linux৮ͬͯΔΤϯδχΞ • ͕ͬͭΓUnix/Linux৮ͬͯΔΤϯδχΞ • ΤϯδχΞ͡Όͳ͍ʢσβΠφʔͱ͔ʣ
ຊ
ຊͳ͢͜ͱ ϫϯϥΠφʔͰTIFMM͠Α͏ FNBDT͔ΒTIFMMΛ͏͍͔ͭ͘ͷํ๏
ຊͳ͢͜ͱ ϫϯϥΠφʔͰTIFMM͠Α͏ FNBDT͔ΒTIFMMΛ͏͍͔ͭ͘ͷํ๏
͜Μͳ͜ͱͬͯ·ͤΜ͔ʁ $ cd /path/to/dir $ ls foo bar buzz $
mv foo foo.bak $ mv bar bar.bak $ mv buzz buzz.bak
shellscriptʹ͢Δͱ͜͏ #!/bin/sh ! LIST=$(ls /path/to/dir) for i in $LIST do
mv $i{,.bak} done
1ߦͰΔͱ͜Μͳײ͡ for i in $(ls /path/to/dir); \ do mv $i{,.bak};
done
for͕͑ΔͱḿΔ • shellૢ࡞ͬͯ܁Γฦ͠࡞ۀଟ͍ • forΛ͔ͭͬͨॻ͖ํ͕છΈ͚Δͱ͍͍ • ίϚϯυஔΛҾʹͱΔͱศར
$ dig s.nanapi.jp $ dig p.nanapi.jp $ dig m.nanapi.jp υϝΠϯʴIPΞυϨεͷ
ରԠදͭ͘Γ͍ͨ
υϝΠϯʴIPΞυϨεͷ ରԠදͭ͘Γ͍ͨ for i in m p s ; \
do host $i.nanapi.jp ; \ done | grep addr | \ awk '{print $1" "$4}'
࿈൪ϑΝΠϧͭ͘Γ͍ͨ • seqίϚϯυ -w ͰθϩຒΊͱ͔Ͱ͖Δ • {1..10}Έ͍ͨͳهड़ʢݺͼํෆ໌ʣ • {a..z}ͱ͔Ͱɺঢॱɾ߱ॱͰ͑Δ
࿈൪ϑΝΠϧ࡞Γ͍ͨ for i in $(seq -w 1 1 100); do
touch file_$i.txt; done
ຊͳ͢͜ͱ ϫϯϥΠφʔͰTIFMM͠Α͏ FNBDT͔ΒTIFMMΛ͏͍͔ͭ͘ͷํ๏
ͳͥemacsʁ • emacs͕͖͔ͩΒ • shellͷૢ࡞σϑΥϧτͰemcasΩʔόΠϯυ • vimͬͯͯɺshellૢ࡞ͦͷ··͍͡Δਓଟ͍
emacs + shell • emacsͷ্ʹ͍ͯɺshell͍͍ͨͱ͖͋Δ • σΟϨΫτϦͭͬͨ͘Γͱ͔ɺϑΝΠϧૢ࡞ͱ͔ • diredҰ୴͓͍͓ͯ͜͏ •
IDEҰ୴͓͍͓ͯ͜͏
ผλʔϛφϧ
• CTRL + z Ͱbackgroud • γϯάϧΟϯυͰͰ͖Δ • emacsͰϠϯΫͨ͠จࣈྻ ͔ͭͬͯshell͍͍ͨ
• λʔϛφϧͰͷίϐϖͳ͊ • tmux/screen͔ͭ͏ͷͳ͊ -nwݶఆ background
• ୯ൃར༻ͳΒ͜Ε͕ศར • scriptॻ్͍ͯͯதͰ࣮ߦͨ͠ Γ͍ͨ͠ͱ͖ͱ͔ • ͔ͨ͠ඪ४Ͱ͑ͨͣ M-! shell-command
• elispͰ࣮͞ΕͯΔshell • lsίϚϯυͳΒɺem-ls.el͕ݺ Ε͍ͯΔ • ͍͘͢͝ʹ͍͘͠ɺ͋͑ͯ Θͳ͍͍ͯ͘ͱࢥ͏ • ศརͳ͍ํ͋Δͷ͔ͳɾɾɾ
M-x eshell
• Լ෦ʹshellઐ༻Οϯυ͕ ग़ͯ͘Δ • F6ʹׂΓͯͯɺදࣔɾඇද ࣔΛτάϧͤͯ͞Δ • ඞཁͳͱ͖͚ͩʹ͔ͭ͑Δͷ Ͱ͘͢͝ศར shell-pop.el
ຊͷ·ͱΊ • ϫϯϥΠφʔͰॻ͘ͱ͍Ζ͍ΖḿΔ • ͱ͘ʹforศརͳͷͰखบʹͳΔͱ͍͍ײ͡ • emacsͷ͕ଟͯ͘͢Έ·ͤΜ
None