This is a discussion on Re: Testing wanted: OpenSSH 4.8 within the OpenSSH Development forums, part of the Networking and Network Related category; Tim Rice wrote: > On Sat, 15 Mar 2008, Damien Miller wrote: > >> On Thu, 13 Mar 2008, ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Tim Rice wrote:
> On Sat, 15 Mar 2008, Damien Miller wrote: > >> On Thu, 13 Mar 2008, Tim Rice wrote: .... >>> You can not expect which to be on all platforms. >> We already use `which` for determining an absolute path to sshd in >> test-exec.sh. Do you have an alternative? > > Yes I noticed that after I posted. No I don't have an alternative. > On further reflection I think it's only some older openserver platforms > that will be affected and they will have other things broken in them anyway. > > Go ahead and use which. Or, you could just use something like (tested with spaces in dirnames): function mywhich { TBIN="$1" OIFS="$IFS" IFS=':' for p in $PATH; do if test -x "$p"/"$TBIN"; then echo "$p"/"$TBIN" IFS="$OIFS" return 1 fi done IFS="$OIFS" return 0 } _______________________________________________ openssh-unix-dev mailing list openssh-unix-dev@mindrot.org https://lists.mindrot.org/mailman/li...enssh-unix-dev |
![]() |
| Thread Tools | |
| Display Modes | |
|
|