<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ni66ling</author_name>
  <author_url>https://blog.hatena.ne.jp/ni66ling/</author_url>
  <blog_title>どこでも見れるメモ帳</blog_title>
  <blog_url>https://ni66ling.hatenadiary.jp/</blog_url>
  <categories>
    <anon>bash</anon>
    <anon>高速化</anon>
  </categories>
  <description>はじめに 「コマンドライン引数を色々試したいけど，各処理がシングルスレッドで回って遅い…」という状況が生じたのでメモ． 対処法を簡単に言うと，xargsにより各処理をパラレルに処理することにより高速化する． 言ってしまえば，ターミナルを複数立ち上げて実行するのを1つのターミナルでやってしまうようなもの． xargsによる並列処理 xargs -Pにより，並列処理する．-Pは並列の意味． 並列数は-Pの後に記述する．-P8なら8並列化． また，-P0とすれば並列数が自動的に決定される*1． 具体的な方法 $ for ((param=0; param&lt;10; param++)) ; do echo…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fni66ling.hatenadiary.jp%2Fentry%2F20140122%2F1390378406&quot; title=&quot; xargsで並列処理 - どこでも見れるメモ帳&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>http://cdn-ak.f.st-hatena.com/images/fotolife/n/ni66ling/20160611/20160611160134.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2014-01-22 17:13:26</published>
  <title> xargsで並列処理</title>
  <type>rich</type>
  <url>https://ni66ling.hatenadiary.jp/entry/20140122/1390378406</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
