Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • My favorite sort of fun! Crazyness :)

    • I made it into a shell script so I'd have a working groups program since Mac OS X 10.6.2 has a "wrong" version. The shell script is dumb and just assumes it's ok to read 32 ints.

      #!/bin/bash
       
      cat >/tmp/groups.gdb <<EOF
        print \$ngroups = (int)getgroups(0,0)
        set \$groups = (int*)malloc(4092)
        set \$ngroups = (int)getgroups(\$ngroups,\$groups)
        x/32d \$groups
        call (void)free(\$groups)
        detach
        quit
      EOF
       
      gdb -x /tmp/groups.gdb -p $1