<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>turusuke_0</author_name>
  <author_url>https://blog.hatena.ne.jp/turusuke_0/</author_url>
  <blog_title>Webdelog</blog_title>
  <blog_url>https://www.webdelog.info/</blog_url>
  <categories>
  </categories>
  <description>シェルで複雑な処理を書きたい場合はスクリプトファイルを作成することになります。 私の場合、JavaScript で書きたくなります。Node.js にはChild process というモジュールが存在しています。 これを経由することで子プロセスを作成して OS のコマンドを Node.js から実行することができます。 const { spawn } = require('child_process'); const ls = spawn('ls', ['-lh', '/usr']); ls.stdout.on('data', (data) =&gt; { console.log(`stdout:…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.webdelog.info%2Fentry%2F2021%2F11%2F06%2F215036&quot; title=&quot;zx を使って JavaScript でスクリプトを書いてみる - Webdelog&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://cdn.blog.st-hatena.com/images/theme/og-image-1500.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2021-11-06 21:50:36</published>
  <title>zx を使って JavaScript でスクリプトを書いてみる</title>
  <type>rich</type>
  <url>https://www.webdelog.info/entry/2021/11/06/215036</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
