backup de julho
[h2N7SspZmY.git] / data / cache / 4 / 4b424281e7d94942a5f752e277c6c4eb.code
blobf2b35045ef361035c0fe51fe10a07366ed946f47
1 <span class="co0">#!/bin/bash</span>
2 <span class="re2">dir_names</span>=<span class="br0">&#40;</span><span class="st0">&quot;tcp/null&quot;</span> <span class="st0">&quot;tcp/sort&quot;</span> <span class="st0">&quot;udp/null&quot;</span> <span class="st0">&quot;udp/sort&quot;</span> <span class="st0">&quot;rpc/null/tcp&quot;</span> <span class="st0">&quot;rpc/null/udp&quot;</span> <span class="st0">&quot;rpc/sort/tcp&quot;</span><span class="br0">&#41;</span>
3 <span class="kw1">for</span> d <span class="kw1">in</span> <span class="br0">&#123;</span>0..9<span class="br0">&#125;</span>
4 <span class="kw1">do</span>
5         <span class="re2">dir_name</span>=<span class="co1">${dir_names[$d]}</span>
6         <span class="kw3">echo</span> <span class="st0">&quot;<span class="es2">$dir_name</span>&quot;</span>
7         <span class="kw2">mv</span> <span class="st0">&quot;<span class="es2">$dir_name</span>/out.txt&quot;</span> <span class="st0">&quot;<span class="es2">$dir_name</span>/out.bak.txt&quot;</span>
8         <span class="kw1">for</span> j <span class="kw1">in</span> <span class="br0">&#123;</span>0..3<span class="br0">&#125;</span>
9         <span class="kw1">do</span>
10                 <span class="co0">#echo &quot;$j&quot;</span>
11                 <span class="kw1">for</span> i <span class="kw1">in</span> <span class="br0">&#123;</span>0..9<span class="br0">&#125;</span>
12                 <span class="kw1">do</span>
13                         <span class="co0">#echo &quot;$i&quot;</span>
14                         <span class="kw1">if</span> <span class="br0">&#91;</span> <span class="st0">&quot;<span class="es2">$d</span>&quot;</span> = <span class="st0">&quot;8&quot;</span> <span class="br0">&#93;</span> <span class="sy0">||</span> <span class="br0">&#91;</span> <span class="st0">&quot;<span class="es2">$d</span>&quot;</span> = <span class="st0">&quot;9&quot;</span> <span class="br0">&#93;</span>
15                         <span class="kw1">then</span>
16                                 <span class="kw3">cd</span> <span class="st0">&quot;<span class="es2">$dir_name</span>&quot;</span>
17                                 <span class="co0">#java Client 127.0.0.1:808&quot;$d&quot; &gt;&gt; &quot;out.txt&quot;</span>
18                                 java Client 143.54.12.150:<span class="nu0">808</span><span class="st0">&quot;<span class="es2">$d</span>&quot;</span> <span class="sy0">&gt;&gt;</span> <span class="st0">&quot;out.txt&quot;</span>
19                                 <span class="kw3">cd</span> <span class="st0">&quot;../../&quot;</span>
20                         <span class="kw1">else</span>
21                                 <span class="co0">#./&quot;$dir_name/client&quot; 127.0.0.1 808&quot;$d&quot; &gt;&gt; &quot;$dir_name/out.txt&quot;</span>
22                                 .<span class="sy0">/</span><span class="st0">&quot;<span class="es2">$dir_name</span>/client&quot;</span> 143.54.12.150 <span class="nu0">808</span><span class="st0">&quot;<span class="es2">$d</span>&quot;</span> <span class="sy0">&gt;&gt;</span> <span class="st0">&quot;<span class="es2">$dir_name</span>/out.txt&quot;</span>
23                         <span class="kw1">fi</span>
24                 <span class="kw1">done</span>
25                 <span class="kw2">sleep</span> 60
26         <span class="kw1">done</span>
27         .<span class="sy0">/</span>calc.rb <span class="st0">&quot;<span class="es2">$dir_name</span>/out.txt&quot;</span>
28 <span class="kw1">done</span>