#!/bin/sh - # getfacls - display discretionary `getfacl` file information in short format # Steve Kinzler, kinzler@cs.indiana.edu, Sep 00 # http://www.cs.indiana.edu/~kinzler/home.html#unix getfacl ${1+"$@"} 2>&1 | perl -ne ' chop; $n && print("\n"), $n = 0, next if /^\s*$/; $n++, print, next if s/^#\s*file: (.*)/$1:\t/i; next if /^#/; s/\s*#effective:/#/; s/^default:/d:/; s/^(d:)?user:/$1u:/; s/^(d:)?group:/$1g:/; s/^(d:)?mask:/$1m:/; s/^(d:)?other:/$1o:/; s/^/, / if $n++ > 1; print; END { $n && print "\n" } '