From: Antoine <abo...@ya...> - 2005-04-23 13:40:45
Thanks for the code. I'm not very familiar with sed so
I rewrote it in perl as below. This one is tested and
works. :)
#!/usr/bin/perl
while( <STDIN> ) {
next unless s/^changed: (.*) //;
$filename = $1;
while( /([a-z])\(([\d-]+):([\d-]+)\)/g ) {
$1 eq "u" and run( "chown $2 $filename" );
$1 eq "g" and run( "chgrp $2 $filename" );
}
}
sub run {
print( "$_[0]\n" );
system( "$_[0]" ) and die "command failed";
}
--- "Ed L. Cashin" <ec...@gm...> wrote:
> It does sound like something that could be
> scripted with a little sed. I don't usually post
> untested scripts, but this is just to convey a
> general approach ...
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
From: Ed L. C. <ec...@gm...> - 2005-04-23 20:26:19
On 4/23/05, Antoine <abo...@ya...> wrote:
> Thanks for the code. I'm not very familiar with sed so
> I rewrote it in perl as below. This one is tested and
> works. :)
Thanks for posting that. Mine didn't do groups,
just uid.
--=20
Ed L. Cashin <ec...@no...>