<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>guitarrapc_tech</author_name>
  <author_url>https://blog.hatena.ne.jp/guitarrapc_tech/</author_url>
  <blog_title>tech.guitarrapc.cóm</blog_title>
  <blog_url>https://tech.guitarrapc.com/</blog_url>
  <categories>
    <anon>C#</anon>
  </categories>
  <description>Zxを使うとシェルで実行するコマンドをawait &quot;文字列&quot;で実行できます。C#のZx(ProcessX)では文字列中に&quot;が含まれるとエスケープが必要です。 このエスケープ挙動がWindows(cmd)とLinux(Bash)で異なるというメモです。 概要 C#でZxを使う &quot;のエスケープ トラブルになる例 まとめ 概要 ProcessXのZxでコマンド中にダブルクォートの文字列を渡す場合は、Linux(Bash)で二重エスケープが必要です。Windows(cmd)では二重エスケープ不要です。 OSによってエスケープ方法が異なるため、マルチOSで動作させる場合はエスケープ処理を工夫します。 /…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftech.guitarrapc.com%2Fentry%2F2025%2F01%2F09%2F235638&quot; title=&quot;Zxでコマンド中の文字列をエスケープする - tech.guitarrapc.cóm&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>2025-01-09 23:56:38</published>
  <title>Zxでコマンド中の文字列をエスケープする</title>
  <type>rich</type>
  <url>https://tech.guitarrapc.com/entry/2025/01/09/235638</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
