Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
mug896 committed Nov 21, 2020
1 parent 207bb84 commit 2e5034c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions exp_and_sub/parameter_expansion.html
Original file line number Diff line number Diff line change
Expand Up @@ -2013,12 +2013,12 @@ <h1 id="quiz">Quiz</h1>
<h1 id="2-">2 .</h1>
<p>&#xBA85;&#xB839;&#xC758; &#xC778;&#xC218;&#xB85C; &#xD30C;&#xC77C;&#xC774; &#xC8FC;&#xC5B4;&#xC9C0;&#xBA74; &#xD30C;&#xC77C;&#xC5D0;&#xC11C; &#xB77C;&#xC778;&#xC744; &#xC77D;&#xC5B4;&#xB4E4;&#xC5EC; &#xCC98;&#xB9AC;&#xD558;&#xACE0;,
&#xADF8;&#xB807;&#xC9C0; &#xC54A;&#xC73C;&#xBA74; stdin ( &#xD130;&#xBBF8;&#xB110;, &#xD30C;&#xC774;&#xD504;, redirection ) &#xC5D0;&#xC11C; &#xB77C;&#xC778;&#xC744; &#xC77D;&#xC5B4;&#xC11C; &#xCC98;&#xB9AC;&#xD558;&#xB294; &#xBA85;&#xB839;&#xC744; &#xB9CC;&#xB4DC;&#xB294; &#xAC83;&#xC785;&#xB2C8;&#xB2E4;.</p>
<pre><code class="lang-bash">$ <span class="hljs-function"><span class="hljs-title">fun</span></span> () { $ cat tmp.txt
<span class="hljs-built_in">local</span> sum <span class="hljs-number">111</span>
<span class="hljs-keyword">while</span> <span class="hljs-built_in">read</span> -r line <span class="hljs-number">222</span>
<span class="hljs-keyword">do</span> <span class="hljs-number">333</span>
<pre><code class="lang-bash">$ <span class="hljs-function"><span class="hljs-title">fun</span></span> () { $ cat tmp.txt
<span class="hljs-built_in">local</span> sum <span class="hljs-number">111</span>
<span class="hljs-keyword">while</span> <span class="hljs-built_in">read</span> -r line <span class="hljs-number">222</span>
<span class="hljs-keyword">do</span> <span class="hljs-number">333</span>
sum+=<span class="hljs-string">&quot;<span class="hljs-variable">$line</span>&quot;</span>$<span class="hljs-string">&apos;\n&apos;</span>
<span class="hljs-keyword">done</span> &lt; <span class="hljs-string">&quot;<span class="hljs-variable">${1:-/dev/stdin}</span>&quot;</span>
<span class="hljs-keyword">done</span> &lt; <span class="hljs-string">&quot;<span class="hljs-variable">${1:-/dev/stdin}</span>&quot;</span> || <span class="hljs-built_in">return</span>

<span class="hljs-built_in">echo</span> ----------------------
<span class="hljs-built_in">echo</span> -n <span class="hljs-string">&quot;<span class="hljs-variable">$sum</span>&quot;</span>
Expand Down
2 changes: 1 addition & 1 deletion search_index.json

Large diffs are not rendered by default.

0 comments on commit 2e5034c

Please sign in to comment.