Subject: Re: passing options through MAKEDEV to MAKEDEV.local
To: None <tech-userlevel@netbsd.org>
From: Alan Barrett <apb@cequrux.com>
List: tech-userlevel
Date: 09/02/2006 12:35:05
On Sat, 02 Sep 2006, David Laight wrote:
> So you want the first arguments?
> if you don't need to worry about spaces in the options then:
> 
> get_opts() {
> 	opts="$*"
> 	shift $((OPTIND-1))
> 	opts="${opts:%$*}"
> }
> 
> then
> 	get_opts "$*"

Neat trick, but I think you want "$@" in the last line.

--apb (Alan Barrett)