Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
#!/usr/local/bin/perl -w #-*-perl-*- # use strict; use Win32::NetAdmin; use vars qw ( @WhoList ); my ($VERSION) = '$Revision: 1.0 $' =~ /([.\d]+)/; my $warnings = 0; # Print a usuage message on a unknown option. $SIG {__WARN__} = sub { if (substr ($_ [0], 0, 14) eq "Unknown option") {die "Usage"}; require File::Basename; $0 = File::Basename::basename ($0); $warnings = 1; warn "$0: @_"; }; $SIG {__DIE__} = sub { require File::Basename; $0 = File::Basename::basename ($0); if (substr ($_ [0], 0, 5) eq "Usage") { die <<EOF; $0 (NT Perl bin utils) $VERSION $0 [ -h ] EOF } die "$0: @_"; }; die "Usage" if $ARGV[0]; my $Server = ""; Win32::NetAdmin::LoggedOnUsers ( $Server, \@WhoList ) or die "$^E\n"; foreach my $UserName ( @WhoList ) { print "$UserName\t"; } =pod =head1 NAME B<users> - display a compact list of users logged in =head1 SYNOPSIS B<users> [ -h ] =head1 DESCRIPTION B<users> lists the login names of the users currently on the system in + a compact, one-line format. =head2 OPTIONS The following options are supported: =over 4 =item -h Display syntax. =back =head1 EXAMPLE Below is an example of the B<users> output: C:\> users shoehorn Administrator =head1 ENVIRONMENT The working of B<users> is not influenced by any environment variables +. =head1 BUGS B<users> isn't as nice as I would like, but Win32 isn't Unix, now is i +t? I did not bother to work on the formatting of the output beyond a tab +between users. =head1 STANDARDS It does not make sense to talk about standards in a B<users> manual pa +ge. =head1 REVISION HISTORY users Revision 1.0 2000/06/22 10:32:57 idnopheq Initial revision =head1 AUTHOR The Perl implementation of B<users> was written by Dexter Coffin, I<id>. =head1 COPYRIGHT and LICENSE This program is copyright by Dexter Coffin 2000. This program is free and open software. You may use, copy, modify, dis +tribute, and sell this program (and any modified variants) in any way you wish, provided you do not restrict others from doing the same. =head1 SEE ALSO =for html <a href="who.html">who</a><p> =head1 NEXT TOPIC =cut

In reply to users for NT/2K by idnopheq

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others surveying the Monastery: (6)
    As of 2021-03-03 09:37 GMT
    Find Nodes?
      Voting Booth?
      My favorite kind of desktop background is:

      Results (76 votes). Check out past polls.