SUMMARY : which command comes back with no match then result

From: <>
Date: Mon Jul 02 2007 - 13:53:16 EDT
Thanks for feedback from
Michael Maciolek, Matthew Stier, Christopher L. Barnard, Paul Piraino,
Darren Dunham, Jeff Woolsey, Brad Morrison, and Chris Buesgens

/usr/bin/which is a 'csh' script.

It sources your ~/.cshrc file, and there was piece that failed when run
in a non-interactive mode.

I wrapped the offending code in a test for $prompt, and the problem went

if ( ${?prompt} ) then

other options suggested to track down the problem

You can start by comparing the 'which' executables on two machines, one
that behaves normally and the one that produces the 'No match' messages.
They'll probably match, but it's good to be thorough.

	sum /usr/bin/which

Since 'which' is a shell script (and a fairly short one at that), you
can easily debug it; try the command:

	csh -vx /usr/bin/which metastat

Run a truss command on the which command.
For example:

	# truss -fea -o /tmp/which.out /usr/bin/which metastat

-----Original Message-----
[] On Behalf Of Hallman, John
Sent: Friday, June 29, 2007 12:07 PM
Subject: which command comes back with no match then result

SunOS frodan 5.9 Generic_122300-02 sun4u sparc SUNW,Sun-Fire-V440

/usr/bin/which metastat

No match

No match


ls -l /usr/bin/which

-r-xr-xr-x   1 root     bin         1288 Apr  6  2002 /usr/bin/which

Anyone ever seen this behavior where the result prints two lines of no
match then the result?

None of my other servers are doing this.

sunmanagers mailing list
sunmanagers mailing list
Received on Mon Jul 2 13:53:39 2007

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:44:06 EST