<div dir="ltr"><br>It's true. I tried to printf all argv and found them already expanded in the output.<div style>Maybe we should look into a real shell source for details.</div><div style><br></div><div style>-Minhui</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Sep 6, 2013 at 10:32 PM, Nick Smith <span dir="ltr"><<a href="mailto:nsmith1@stevens.edu" target="_blank">nsmith1@stevens.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>Hongyi,
<br>
This expansion is handled in the shell, before the command is
executed. For example, with the following:
<br>
$ tree test
<br>
test
<br>
├── a
<br>
├── b
<br>
└── c
<br>
<br>
0 directories, 3 files
<br>
$ cp test/* /tmp
<br>
<br>
cp here receives 4 parameters,
<br>
test/a
<br>
test/b
<br>
test/c
<br>
/tmp
<br>
<br>
Hope that helps
<br>
-Nick<div><div class="h5"><br>
<br>
On 09/06/2013 09:15 PM, Hongyi Shen wrote:<br>
</div></div></div>
<blockquote type="cite"><div><div class="h5">
<div dir="ltr">Sorry, it's me again.
<div>When comes to the commands like ls, rm, mv, cp,
how do they handle the operands with regular expressions? Is
there a library contains regex parser or something like that?</div>
<div><br>
</div>
<div>I failed to found that in source code or search on
Google. I tried to use strace, but it only present system
calls. </div>
<div><br>
</div>
<div><br>
</div>
<div>Hongyi Shen.</div>
<div><br>
</div>
</div>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>_______________________________________________
cs631apue mailing list
<a href="mailto:cs631apue@lists.stevens.edu" target="_blank">cs631apue@lists.stevens.edu</a>
<a href="https://lists.stevens.edu/mailman/listinfo/cs631apue" target="_blank">https://lists.stevens.edu/mailman/listinfo/cs631apue</a>
</pre>
</blockquote>
</div>
<br>_______________________________________________<br>
cs631apue mailing list<br>
<a href="mailto:cs631apue@lists.stevens.edu">cs631apue@lists.stevens.edu</a><br>
<a href="https://lists.stevens.edu/mailman/listinfo/cs631apue" target="_blank">https://lists.stevens.edu/mailman/listinfo/cs631apue</a><br>
<br></blockquote></div><br></div>