<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>alfja</author_name>
  <author_url>https://blog.hatena.ne.jp/alfja/</author_url>
  <blog_title>hawkenの日記</blog_title>
  <blog_url>https://hawken.hatenadiary.com/</blog_url>
  <categories>
  </categories>
  <description>メモ execで実行ファイルを指定すると、現在のプロセスを置き換える形でプログラムが実行されます。 exec {実行ファイル} exec &gt; file を実行すると、現在実行しているシェルの標準出力をファイルにリダイレクトします。 シェルスクリプト内で以下のように実行すれば、簡単にシェルの出力結果をログに残せます。 exec &gt;&gt; text.log 以降の標準出力を標準エラー出力にリダイレクトすることも可能です。 exec &gt;&amp;2 標準出力を端末に戻す場合は exec &gt; /dev/tty</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhawken.hatenadiary.com%2Fentry%2F2022%2F12%2F07%2F201549&quot; title=&quot;シェルスクリプト便利技 exec &amp;gt; file - hawkenの日記&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>2022-12-07 20:15:49</published>
  <title>シェルスクリプト便利技 exec &gt; file</title>
  <type>rich</type>
  <url>https://hawken.hatenadiary.com/entry/2022/12/07/201549</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
