What gives with bracket syntax in NIS+?

What gives with bracket syntax in NIS+?

Post by Ken Mcdona » Sat, 10 Dec 1994 02:38:52



According to my documentation and understanding, both

nismatch name=mcdonald passwd.org_dir

and

nismatch [name=mcdonald],passwd.org_dir

should give the same result--but they don't.  The first correctly
returns the passwd table entry I am looking for, while the second
says "No match".  This problem applies to other commands also,
such as niscat.  Any suggestions as to what I might be doing wrong?

Thanks,
Ken McDonald

 
 
 

What gives with bracket syntax in NIS+?

Post by Gerold Meerkoett » Sun, 11 Dec 1994 10:06:49



>nismatch name=mcdonald passwd.org_dir
>and
>nismatch [name=mcdonald],passwd.org_dir
>should give the same result--but they don't.  The first correctly
>returns the passwd table entry I am looking for, while the second
>says "No match".  This problem applies to other commands also,
>such as niscat.  Any suggestions as to what I might be doing wrong?

You're obviously using the csh (or something similar).  The error
messages comes from your shell, which is an (IMHO poor) attempt to
tell you that there is no filename matching the pattern
[name=mcdonald],passwd.org_dir. Nismatch doesn't even get executed
by csh in this case.

Use quotes or backslashes to suppress the shell's pattern matching,
e.g.

% nismatch '[name=mcdonald],passwd.org_dir'

        Gerold
--

Fachhochschule Lippe - DVZ/NOC, Liebigstr. 87, 32657 Lemgo, Germany
Voice: +49 5261 702 333, Fax: +49 5261 702 222

 
 
 

What gives with bracket syntax in NIS+?

Post by William LeFebv » Sun, 11 Dec 1994 01:31:49




>According to my documentation and understanding, both

>nismatch name=mcdonald passwd.org_dir

>and

>nismatch [name=mcdonald],passwd.org_dir

>should give the same result--but they don't.  The first correctly
>returns the passwd table entry I am looking for, while the second
>says "No match".  This problem applies to other commands also,
>such as niscat.  Any suggestions as to what I might be doing wrong?

At the risk of embarrassing you:  [ and ] have special meaning to
the shell.  And you want the command to see them instead of having
the shell try to expand them.  You want:

        nismatch '[name=mcdonald],passwd.org_dir'

The error you see ("No match") is a shell error message.

                        William LeFebvre
                        Decision and Information Sciences
                        Argonne National Laboratory

 
 
 

1. const_cast gives syntax error

Hi All,
I am trying to compile a piece of code that has const_cast expression.
Compiler (xlC) gives syntax error for this. Why it is like this when
same piece of code works fine on NT and SOLARIS.
I am using this expression in several places of my code.

Thanks in advance.

* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!

2. ppp x86 2.5.1

3. :include: syntax in Solaris 2.3 NIS aliases map

4. Recovery from "mkfs -c /dev/hdb"

5. help auto_home nis+ syntax

6. pseudo-ttys

7. NIS source syntax checker?

8. Lions Text

9. NIS+ syntax

10. inline assembler error - porting Intel syntax to AT&T syntax

11. intel Syntax -> AT&T Syntax

12. AT&T asm syntax but not IBM asm syntax?

13. access.conf syntax error without a syntax error