[cs631apue] How *nix commands support regex ?

Nick Smith nsmith1 at stevens.edu
Fri Sep 6 22:32:10 EDT 2013


Hongyi,
This expansion is handled in the shell, before the command is executed. 
For example, with the following:
$ tree test
test
├── a
├── b
└── c

0 directories, 3 files
$ cp test/* /tmp

cp here receives 4 parameters,
test/a
test/b
test/c
/tmp

Hope that helps
-Nick

On 09/06/2013 09:15 PM, Hongyi Shen wrote:
> Sorry, it's me again.
> 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?
>
> I failed to found that in source code or search on Google. I tried to 
> use strace, but it only present system calls.
>
>
> Hongyi Shen.
>
>
>
> _______________________________________________
> cs631apue mailing list
> cs631apue at lists.stevens.edu
> https://lists.stevens.edu/mailman/listinfo/cs631apue
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.stevens.edu/pipermail/cs631apue/attachments/20130906/349b9c69/attachment.html>


More information about the cs631apue mailing list