Subject: Re: mergemaster
To: Alistair Crooks <agc@pkgsrc.org>
From: Paul Goyette <paul@whooppee.com>
List: current-users
Date: 11/14/2001 04:43:02
Well, if you want to do it that way, you'd better add all the variants
with the set{g,u}id bits: rws, rwS, -ws, -wS, r-s, r-S, --s, and --S.
Then, there's always the sticky bit to deal with on directories...
:)
On Wed, 14 Nov 2001, Alistair Crooks wrote:
> It's not that drastic using awk: pipe the output from "ls -al" through:
>
> awk '
> BEGIN { n["rwx"]="7"; n["rw-"]="6"; n["r-x"]="5"; n["r--"]="4"; n["-wx"]="3"; n["-w-"]="2"; n["--x"]="1"; n["---"]="0"}
> { print "0" n[substr($1,2,3)] n[substr($1,5,3)] n[substr($1,8,3)]}'
>
> (This just proves that awk scripts can be made to look like modem noise too)
>
> Regards,
> Alistair
>
----------------------------------------------------------------------
| Paul Goyette | PGP DSS Key fingerprint: | E-mail addresses: |
| Network Engineer | BCD7 5301 9513 58A6 0DBC | paul@whooppee.com |
| & World Cruiser | 91EB ADB1 A280 3B79 9221 | pgoyette@juniper.net |
----------------------------------------------------------------------