<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>te-nu</author_name>
  <author_url>https://blog.hatena.ne.jp/te-nu/</author_url>
  <blog_title>ウェブエンジニア珍道中</blog_title>
  <blog_url>https://www.te-nu.com/</blog_url>
  <categories>
    <anon>Node.js</anon>
  </categories>
  <description>Node.js上でlinuxコマンドの叩き方を備忘録として残します。 実行方法 child_processをrequireしてexecメソッドを使います。 const exec = require('child_process').exec; exec(&quot;echo 'hogehoge'&quot;, (error, stdout, stderr) =&gt; { if (error) { console.log(error); console.log(stderr); } console.log(stdout); }); execメソッドには第一引数には叩くコマンドを文字列で、第二引数にはコマンドの結果が返っ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.te-nu.com%2Fentry%2F2018%2F08%2F09%2F210617&quot; title=&quot;Node.js上でのlinuxコマンドの叩き方 - ウェブエンジニア珍道中&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>2018-08-09 21:06:17</published>
  <title>Node.js上でのlinuxコマンドの叩き方</title>
  <type>rich</type>
  <url>https://www.te-nu.com/entry/2018/08/09/210617</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
