<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>citrus_bus</author_name>
  <author_url>https://blog.hatena.ne.jp/citrus_bus/</author_url>
  <blog_title>citrus_busの日記</blog_title>
  <blog_url>https://citrus-bus.hatenadiary.org/</blog_url>
  <categories>
    <anon>expect</anon>
  </categories>
  <description>expectは対話式のコマンドを自動化してくれるそうな。 fdiskを使った例をあげていく。 引数にファイル名を渡し実行する。 expect ファイル名 これで勝手に進めてくれる。 ファイルにはTcl(Tool Command Languageというらいし)で処理を書く。 まず最初はこれ↓(おまじないです) #! /usr/bin/expect -f この後にTclで処理を書いていく。 spawn fdisk /dev/sdb spawnはコマンドを実行する。 上記ではfdiskを引数/dev/sdbで実行することになる。 この後にfdiskをどのように処理するかを書いていく。 expect …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fcitrus-bus.hatenadiary.org%2Fentry%2F20080530%2F1212138471&quot; title=&quot;対話式コマンドを自動化 - citrus_busの日記&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2008-05-30 18:07:51</published>
  <title>対話式コマンドを自動化</title>
  <type>rich</type>
  <url>https://citrus-bus.hatenadiary.org/entry/20080530/1212138471</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
