shell scripts and comand arguments

Lou Kamenov phayze at secureroot.org.uk
Tue Jun 3 16:08:34 BST 2003


In some email I received from "Frank Shute" <frank at esperance-linux.co.uk> on Mon, 2 Jun
2003 17:14:16 +0100, wrote:

> On Mon, Jun 02, 2003 at 10:57:02AM +0100, Jonathan Belson wrote:
> >
> > On Monday 02 June 2003 10:15 am, Frank Shute wrote:
> > > On Mon, Jun 02, 2003 at 09:07:32AM +0100, John Rochester wrote:
> > > > You need sh to pass this through another parsing stage to catch the
> > > > quotes.
> > > >
> > > > Change the final line to
> > > >
> > > >     eval mhonarc "$args"
> > > >
> > > > and it should work.

eval is a pretty useful thing 
it works really well in thigs like

foo=(foo1 foo2 foo3)
funct(){
	eval eval myarr=(\${${1}[@]})
	....
	....
}

funct foo

anyway there's a plenty of 'eval' examples and good scripting in the FreeBSD rc system.

sometimes i think bash is so much more powerful then csh even tcsh

even things like /dev/tcp/host/port  :))

anyway it's still obsolete for real programming ;-D
sometimes ago I found Bash OOP, no kidding! 


cheers,
-lou




More information about the Ukfreebsd mailing list