Would somebody please explain?
Henry McGilton
henry at angel.Eng.Sun.COM
Sun Apr 21 13:17:33 AEST 1991
In article <1991Apr21.023416.5795 at mp.cs.niu.edu>, rickert at mp.cs.niu.edu (Neil Rickert) writes:
* In article <1991Apr21.001702.5661 at umbc3.umbc.edu> rouben at math16.math.umbc.edu (Rouben Rostamian) writes:
** The command:
** expr "Match" : "Ma"
** returns 2, as it should, since the first two characters
** of "Match" and "Ma" coincide. Now, would somebody please
** explain why the command:
** expr "match" : "ma"
** complains of a "syntax error"?
* I just ran: strings /bin/expr
* From the output I would guess that 'match', 'index', 'substr' and
* 'length' are builin functions or operators for 'expr', although
* they are not documented in any man pages that I have seen.
* I don't know the syntax for using them either.
* I guess this is one of those questions to cross post to wizards.
I hope not. From SunOS expr manual page (last updated 5 January 1988):
``Note: the match, substr, length, and index operators cannot
themselves be used as ordinary strings.''
........ Henry
More information about the Comp.unix.internals
mailing list