<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>gsf_zero1</author_name>
  <author_url>https://blog.hatena.ne.jp/gsf_zero1/</author_url>
  <blog_title>いろいろ備忘録日記</blog_title>
  <blog_url>https://devlights.hatenablog.com/</blog_url>
  <categories>
    <anon>golang</anon>
  </categories>
  <description>概要 サンプル 参考資料 概要 よく忘れるのでメモメモ。 少し前に exec.Command について以下をメモしていました。 devlights.hatenablog.com 上の記事のサンプルでは (*Cmd).Output() を使って標準出力を取得していましたが、標準エラー出力も含めて欲しいときがあります。 そんなときは、(*Cmd).CombinedOutput() を利用すると標準出力と標準エラー出力を両方取得してくれます。便利ですねー。 サンプル package cmdexec import ( &quot;errors&quot; &quot;os/exec&quot; &quot;runtime&quot; &quot;github.com/d…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fdevlights.hatenablog.com%2Fentry%2F2021%2F04%2F05%2F232239&quot; title=&quot;Goメモ-139 (exec.Command で標準出力と標準エラー出力を両方取得) - いろいろ備忘録日記&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>https://m.media-amazon.com/images/I/41meaSLNFfL._SL160_.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2021-04-05 23:22:39</published>
  <title>Goメモ-139 (exec.Command で標準出力と標準エラー出力を両方取得)</title>
  <type>rich</type>
  <url>https://devlights.hatenablog.com/entry/2021/04/05/232239</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
