[Chicago-talk] chown inside a script

Jay Strauss me at heyjay.com
Wed Dec 5 14:06:36 PST 2007


Oh, ok.

Thanks

On Dec 5, 2007 3:58 PM, Andy Lester <andy at petdance.com> wrote:
> >
> > I've tried various incantations of the wildcard but none work.  Is
> > there some sort of quoting I should be using to make this work, or
> > some other secret?
>
> The shell is what does the globbing, but you're not calling the
> shell.  You're calling chown directly.
>
>
> > I'd rather use a wildcard than globing a list of files to iterate
> > over.
>
>
> You don't need to iterate.  Pass all the filenames as arguments to
> system().
>
> system( 'chown', 'whoever', glob( '/home/blah/blah/whatever*' ) );
>
>
>
> --
> Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance
>
>
>
>
> _______________________________________________
> Chicago-talk mailing list
> Chicago-talk at pm.org
> http://mail.pm.org/mailman/listinfo/chicago-talk
>


More information about the Chicago-talk mailing list