Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
シェル芸に目覚める前と後
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
sickleaf
June 26, 2021
Technology
62
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
シェル芸に目覚める前と後
第54回シェル芸勉強会LT
sickleaf
June 26, 2021
More Decks by sickleaf
See All by sickleaf
20240512ジャンル指定クイズ
sickleaf
0
57
「○○するシェル芸ちゃん」の紹介
sickleaf
0
170
手順メモ(circle.ms、C97申し込み)
sickleaf
0
560
bashcms本で手を動かしてみた
sickleaf
0
970
技術書典4新刊宣伝LT_radiberry pi!
sickleaf
0
230
Other Decks in Technology
See All in Technology
え、こんなに早く改修できるの?──新人エンジニアとスクラムマスターの2人が語る、AI×アジャイル開発の現場
ysasago
0
140
「守り」で活用するオンデバイスLLM 〜写ってはいけないを総力戦で防ぐ〜 / iOSDC Japan 2026
nakamuuu
0
160
CLIライブラリ開発を支える技術
htnabe
0
120
Deployment の 先にある AI Agent 基盤 - kagent vNext、Agent Substrate、Hermes から読み解く Agent Runtime の現在地 / k8s-matsuri-2-ai-agent-platform-amsy810
masayaaoyama
3
600
なぜ「決定性」が 決定的に重要なのか? Durable Execution 基盤の数理的理解 #serverlessjp / ServerlessDays Tokyo 2026
ytaka23
0
210
DEFCON_CHV_CTF_Write-up.pdf
bata_24
0
150
2026-09-18 gotanda.sre Terraformで複数環境作ったり、複数Stateに分割したりそれとTerragrunt / Terraform multi envs and multi states
masasuzu
1
410
AgentCore Runtime上にAgentic Coding基盤を構築・展開する際の設計ポイントと限界点 / Design considerations and limitations when building an agentic coding platform on AgentCore Runtime
har1101
4
180
積み重なった技術負債への挑戦 〜初手としての全社ゴト化〜
techtekt
PRO
0
1.3k
おい、エージェントを使って終わらせろ
nwiizo
0
460
絵ではじめるKubernetesセキュリティ
aoi1
3
620
Spring BootからQuarkusへの移行
tatsuya1bm
2
120
Featured
See All Featured
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
240
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
280
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
My Coaching Mixtape
mlcsv
0
310
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
Visualization
eitanlees
152
17k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
KATA
mclloyd
PRO
35
15k
The Pragmatic Product Professional
lauravandoore
37
7.4k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
510
Transcript
シェル芸に目覚める前と後 ~raspberry piの環境構築にシェル芸を突っ込む~ 第54回シェル芸勉強会 LT 病葉(わくらば) @sickleaf3 1
もくじ ・何をした話? ・シェル芸に目覚める前/後の比較 ・実例(シェル芸の投入パターン) ・実機デモ ・最後に 2
何をした話? ・仕事はWordとExcel作業が中心、家ではLinuxを使ってラジオ環境の整備 ・ラジオ好きが高じて技術書を頒布/出版 ・初版執筆後に知ったシェル芸で培った知見を、今回の改版で出来る限り突っ込んだ 3
本の改版にシェル芸で得た知見を突っ込んだ話 シェル芸に触れた時期 大体2019年頃 2019年2月開催、「光明節シェル芸勉強会」の金スロット問題が強烈に印象に残ってい る 4
本の改版にシェル芸で得た知見を突っ込んだ話 どんな本? raspberry piでラジオ/音声ファイルを聴く環境を作るための構築手順をまとめた本 初版でもシェルスクリプトは使っていたが、シェル芸の観点では大きな差異 あり 5
シェル芸に目覚める前/後の比較 書籍の構成/シェル芸が占める割合(初版) 6
シェル芸に目覚める前/後の比較 書籍の構成/シェル芸が占める割合(第2版) 7
システム構成図 構築完了時のシステムイメージは以下の通り CUI上でのシェルスクリプト実行でも動作可能だが、より快適に利用するためにブラウ ザ画面を提供する(デモ動作) システムイメージ 8
シェル芸の投入パターン 既存の手順や新規手順追加にあたりシェル芸を投入した理由は、概ね以下の3パター ンのいずれか 1. 構築手順の設定値を確実に入力するため 2. テキストエディタの利用を回避するため 3. シェルスクリプトへの組み込み 9
シェル芸の投入パターン 1.構築手順の設定値を確実に入力するため 通常は usermod -G の後に、設定したいグループをカンマ区切りで空白を入れずに列挙 →ユーザを新規作成した後に、既存ユーザに準じた設定を行う場合は利用するべき //新規追加ユーザ(radipi)の所属グループ設定 sudo adduser
radipi groups pi | cut -d: -f2 | sed "s/ /,/g; s/^.//g" # piユーザが所属するグループを表示。 # pi,adm,dialout,.....となることを確認 sudo usermod -G $(groups pi | cut -d: -f2 | sed "s/ /,/g; s/^.//g") radipi # 矢印の↑を押して前回コマンドを再利用し、piユーザが所属するグループをradipiユーザに設定 10
シェル芸の投入パターン 2.テキストエディタの利用を回避するため 最近のツール(イメージ書き込み専用ツール、初期設定ウィザードなど)の提供によ り、Linux/Unix特有のエディタ操作が無くとも利用可能に →ターミナルでのコマンド実行を限度とした場合、必然的にシェル芸が登場 //SSH有効化(ポートは固有番号に変更) sudo sed -i 's/#Port
22/Port 23456/' /etc/ssh/sshd_config //cronログ有効化 sudo sed -i "/#cron/s;#;;g" /etc/rsyslog.conf //赤外線リモコンを動かす時の設定ファイル修正 sudo sed -i '$a dtoverlay=gpio-ir,gpio_pin=24' /boot/config.txt # config.txtを上書き、GPIO24を有効化 sudo sed -i '/driver/s;devinput;default;g' /etc/lirc/lirc_options.conf sudo sed -i '/device/s;auto;/dev/lirc0;g' /etc/lirc/lirc_options.conf # lirc_options.confを上書き 11
シェル芸の投入パターン 3.シェルスクリプトへの組み込み 音声再生・制御には基本的にシェルスクリプト経由で行うため、随所にシェル芸が登 場 12
実機デモ 画面イメージ 13
最後に 14