[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re[2]: 'Inverse' chmod?



Carl Mummert <mummert@cs.wcu.edu> 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 Bernstein                http://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
			              
	  
     




Reply to: