$ perl5.8.6 -MRegexp::Common=list -e 'print map {$_.$/} grep { /$RE{list}{-pat=>"[ugoa]+=[rwxsS]+"}{-sep=>","}/ } @ARGV' ugo=rw,a=r ugo=rw ugo=rw,a=r