Thanks!

On Wed, 19 Sep 2012 08:47:33 +0200 cinap_len...@gmx.de  wrote:
> this has been done before. i can't remember who wrote it
> and i couldnt find it in the contrib index.
> 
> #!/bin/rc
> 
> fn get_dirs {
>       tmp = /tmp/$pid ^_dirs
>       echo -n > $tmp
> 
>       for (f in `{du -nf $root_in | awk '{print $2}' }) 
>               ls -l $f | grep '^d' | awk '{print $10}' >> $tmp
>       dirs = `{sort $tmp}
>       rm $tmp
> }
> 
> root_in=$1
> root_out=$2
> 
> if(~ $3 '') 
>       get_dirs;
> if not 
>       dirs = `{cat $3};
> 
> for(i in $dirs){
>       o=`{echo $i | awk '{gsub(ENVIRON["root_in"], ENVIRON["root_out"], $0); 
> print}'}
>       echo bind -bc $i $o
> }
> 
> 
> theres also divergefs.
> 
> --
> cinap
> 

Reply via email to