Subject: Re: =?ISO-8859-1?Q?some=20help=20with=20a...=20shellscript=3F=BF?=
To: Jojo <info@thrill-inc.com>
From: Bill Studenmund <wrstuden@zembu.com>
List: port-macppc
Date: 08/02/2001 17:02:24
On Wed, 1 Aug 2001, Jojo wrote:

> hi guys,
>
> i am pretty much what you guys call a newbie, but i am reading the list a
> lot and i have got hxd to run on NetBSD [except that the user info is
> f**'d up, but that's not too bad].
> hxd has a find script built in as it seems but it doesnt work for me:
>
> #!/bin/bash
> if [ $# != 0 ]; then
>   x=$1; shift; for i in $@; do x="$x $i"; done
>   exec /usr/bin/find $ROOTDIR -follow -name "$x" -printf "\r%P"
> else
>   exec /usr/bin/find $ROOTDIR -follow -printf "\r%P"
> fi
>
> am i correct that this is for the bash shell? bash isnt installed per
> default [at least i couldnt find it] so i was wondering if anyone here is
> up for the task of making this a script for tcsh [which is the login

I'd recomend against that. I'm a long-time tcsh user (I think I've almost
hit the 10 year mark), and I don't program in it. It's rather gross to
program.

> shell for the user i use to start the server]. i have some symbolic links
> in the files tree of hxd, so here is my working find command:

Just because you use tcsh as your shell doesn't mean scripts can't use sh,
ksh, or bash. :-)

I'd suggest trying ksh, and see if it works. i.e. change /bin/bash to
/bin/ksh. If that doesn't work, install the bash shell, and chagne
/bin/bash to /usr/pkg/bin/bash.

Take care,

Bill