Re: help with matching



Rob.Savino wrote:
> I'm working on a simple script to get a list of users who do not exist
>
> while (<>) {
> $user = system("echo $_");
> $result = system("dsquery user -samID $_");
> }
> if (!$result) {
> print "$user\n";
> }
>
> Here is my problem,
>
> dsquery user -samID should return nothing if a user does not exist. I
> was hoping the script would print $user only if there was no $result
> from dsquery user -samID. However, not only does it print every $user
> regardless of the was not $result, it also prints every $result.
>
> Can someone tell me why this is?

perldoc -q "output of a command"

http://danconia.org

>
> Thanks,
>
> Rob
>
.



Relevant Pages

  • help with matching
    ... I'm working on a simple script to get a list of users who do not exist ... dsquery user -samID should return nothing if a user does not exist. ... Rob ... Prev by Date: ...
    (perl.beginners)
  • Re: Script AD
    ... I would like to create a script for launching on the ... >> Thank you for your assistance. ... Prev by Date: ...
    (microsoft.public.scripting.wsh)
  • Re: Messed up install
    ... I had written a small script to do some thumbnail ... Rob ... Prev by Date: ...
    (comp.lang.perl.modules)
  • RE: help with matching
    ... > Subject: help with matching ... if it fails or succeeds your script will output the user ... queries instead of performing system calls. ... > dsquery user -samID should return nothing if a user does not exist. ...
    (perl.beginners)
  • Re: Problems with Parse::Lex
    ... All I can think of is that perl didn't get built correctly. ... I presume that 'use strict;' in a script produces the same fatality? ... Rob ... Prev by Date: ...
    (comp.lang.perl.modules)