Re[2]: 'Inverse' chmod?

1999-07-16 Thread Bob Bernstein
Thanks to all for the rapid-fire primer in perl. Come to think it, I now know
_more_ about Perl than Hillary knows about New York! g


--
Bob Bernsteinhttp://members.home.net/ruptured-duck
at 
Esmond, Rhode Island, USA
   --==++*++==--
RMS's curmudgeon-like griping that he didn't like the term Open
Source looked silly to many last year; it's not looking so dumb
today... Christopher B. Browne
  
  
 




Re[2]: 'Inverse' chmod?

1999-07-15 Thread Bob Bernstein
Carl Mummert [EMAIL PROTECTED] wrote:

   perl -e 'printf %#o, ((stat(FILENAME))[2]  0x1ff)'

Great! 

It works fine from the command line, but I tried it in a shell script with no
luck.

#! /bin/bash
perl -e 'printf %#o, ((stat($1))[2]  0x1ff)'

Needless to add I know as much about shell scripts as Hillary does about New
York.


--
Bob Bernsteinhttp://members.home.net/ruptured-duck
at 
Esmond, Rhode Island, USA
   --==++*++==--
RMS's curmudgeon-like griping that he didn't like the term Open
Source looked silly to many last year; it's not looking so dumb
today... Christopher B. Browne
  
  
 




Re: Re[2]: 'Inverse' chmod?

1999-07-15 Thread Carl Mummert

--cut
#!/usr/bin/perl

foreach (@ARGV)
{
  printf %#o %s \n, (stat($_))[2]  0x1ff, $_;
}
--cut


CaRL