Little Perl script for sorting objects inside each subject

Submit your RBAC policies or suggest policy improvements

Moderators: spender, PaX Team

Little Perl script for sorting objects inside each subject

Postby Hue-Bond » Sat Mar 04, 2006 8:56 pm

This is something I cooked up in a couple of minutes for those like me that can't stand having the objects unsorted.

Code: Select all
# cat > sorter.pl
(m#^\s*/# .. m# ^[^\s] | ^\s+[^/] #x) =~ /^\d+$/ and push @s, $_ and next;
print sort @s and undef @s if @s;
print;
<type a ^D here>
# perl -n sorter.pl policy > policy2
Hue-Bond
 
Posts: 34
Joined: Mon Dec 13, 2004 4:31 pm

Return to RBAC policy development

cron