|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T i
Length: 1637 (0x665) Types: TextFile Names: »is_able.chk«
└─⟦4f9d7c866⟧ Bits:30007245 EUUGD6: Sikkerheds distributionen └─⟦ed5edc051⟧ »./cops/1.02/cops.102.tar« └─⟦4f9d7c866⟧ Bits:30007245 EUUGD6: Sikkerheds distributionen └─⟦db60b44f1⟧ »./cops/1.02/cops.102.tar.Z« └─⟦ed5edc051⟧ └─⟦this⟧ »cops/is_able.chk«
: # # is_able.chk # # This shell script checks the permissions of all files and directories # listed in the configuration file "is_able.lst", and prints warning messages # according to the status of files. You can specify world or group readability # or writeability. See the config file for the format of the configuration # file. # # Mechanism: This shell script parses each line from the configure file # and uses the "is_{read|write}able" program to check if any of # the directories in question are writable by world/group. All results # are written to standard output. # TEST=/bin/test ECHO=/bin/echo AWK=/bin/awk SED=/bin/sed config_file=is_able.lst if $TEST ! -f "$config_file" ; then $ECHO "Config file $config_file doesn't exist!" exit fi # Read from $dir_list (e.g. "is.chk.lst") what files/dirs to check. # # Comments are lines starting with a "#". # # /path/to/{dir|file} World/Group Read/Write/Both # as above {W|w|G|g} {R|r|W|w|B|b} # { $AWK '/^#/ {next;} \ { world=group=read=write=both=0; \ # need 3 fields, or format error if (NF != 3) next; \ if ($2 != "W" && $2 != "w" && $2 != "G" && $2 != "g") next; \ if ($3!="R"&&$3!="r"&&$3!="W"&&$3!="w"&&$3!="B"&&$3!="b") next; \ for (f=1;f < NF; f++) printf("%s ", $f); \ print $NF; }' $config_file } | while read targets do # Use sed, 'cause awk lets me down (line too long) -- then realize # I should have used sed anyway. Lazy bum. foo=`echo "$targets" | $SED 's/\(.*\)....$/\1/'` args=`echo $targets | $SED 's/.*\(...\)$/\1/'` for f in $foo do # echo $f $args ./is_able $f $args done done # end of script