Re: Testing for directories

2001-02-03 Thread Cameron Simpson
On Fri, Feb 02, 2001 at 09:53:20AM -0500, rpjday <[EMAIL PROTECTED]> wrote: | On Sat, 3 Feb 2001, Matthew Melvin wrote: | > For this we can simplify it alot and get find to do all the work for us... | > find . -type d -exec chmod 2770 {} \; | > ... and because the file name is never passed thr

Re: Testing for directories

2001-02-02 Thread Bret Hughes
Matthew Melvin wrote: > > 'cept xargs isn't going to preserve your spaces. Well it might i guess if > we get find to help out a bit... > > find . -type d -printf '"%p"\n' | xargs chmod 2770 what does the %p represent? Is that a find thing or a shell thing? Bret _

Re: Testing for directories

2001-02-02 Thread Matthew Melvin
On Fri, 2 Feb 2001 at 9:53am (-0500), rpjday wrote: > On Sat, 3 Feb 2001, Matthew Melvin wrote: > > > On Fri, 2 Feb 2001 at 1:54pm (-), Tristan Hill wrote: > > > > > I've got the following bash function to print the name of all directories > > > relative to the current path and change each di

Re: Testing for directories

2001-02-02 Thread rpjday
On Sat, 3 Feb 2001, Matthew Melvin wrote: > On Fri, 2 Feb 2001 at 1:54pm (-), Tristan Hill wrote: > > > I've got the following bash function to print the name of all directories > > relative to the current path and change each directories permission. The > > script fail to pickup directories

Re: Testing for directories

2001-02-02 Thread Matthew Melvin
On Fri, 2 Feb 2001 at 1:54pm (-), Tristan Hill wrote: > I've got the following bash function to print the name of all directories > relative to the current path and change each directories permission. The > script fail to pickup directories with a space in the name though. > Corrections to t

Testing for directories

2001-02-02 Thread Tristan Hill
I've got the following bash function to print the name of all directories relative to the current path and change each directories permission. The script fail to pickup directories with a space in the name though. Corrections to the script would be much appreciated. #!/bin/bash for each in `fi