Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Nov 2003 19:11:04 -0700
From:      Robin Schoonover <end@endif.cjb.net>
To:        Scott W <wegster@mindcore.net>
Cc:        freebsd-questions@FreeBSD.org
Subject:   Re: a good way to save a keystroke?
Message-ID:  <20031121191104.378a262c.end@endif.cjb.net>
In-Reply-To: <3FBEC43B.4070505@mindcore.net>
References:  <6.0.0.22.0.20031121114154.08a0a190@pop.face2interface.com> <3FBEBEA8.7000805@mindcore.net> <6.0.0.22.0.20031121205837.05221fe8@pop.face2interface.com> <3FBEC43B.4070505@mindcore.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 21 Nov 2003 21:04:43 -0500, Scott W <wegster@mindcore.net> wrote:
> Marty Landman wrote:
> 
> > At 08:40 PM 11/21/2003, Scott W wrote:
> >
> >> So yep, it's doing what you want, the way you wanted to...use 
> >> something similar fairly often myself, although note that the 
> >> 'current' standard for executing commands is now $(cmd), eg
> >>
> >> more $(which apachectl)
> >
> >
> > I get
> >
> > FreeB more $(which apachectl)
> > Illegal variable name.
> > FreeB
> >
> > Maybe I should've mentioned I'm on 4.8, or is there another reason?
> >
> > Marty Landman   Face 2 Interface Inc 845-679-9387
> > Sign On Required: Web membership software for your site
> > Make a Website: http://face2interface.com/Home/Demo.shtml
> >
> >
> D'oh, my mistake- you're using csh I take it?  Sorry, I believe the 
> $(cmd) syntax is now 'the standard' in sh/ksh/Bourne/bash, but evidently 
> not csh....sorry, I've never been keen on csh, but that syntax won't 
> work for you, although it will/does even in freeBSD sh.
> 
> Sorry for the confusion,

The backticks (`) are of a general standard than the $(cmd) syntax.  Not
only do backticks work under all shells I've tried them under, but they are
parts of perl and php.

-- 
Robin Schoonover (aka End)
#
# "I'm betting that I'm just abnormal enough to survive."      -The Tick
#



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031121191104.378a262c.end>