AMBER Archive (2006)

Subject: Re: AMBER:

From: Scott Brozell (sbrozell_at_scripps.edu)
Date: Mon Aug 07 2006 - 19:37:19 CDT


Hi,

On Mon, 7 Aug 2006, Glass, Kevin A wrote:

>
> The Amber 8 User's Guide say that if a "maskstr" contains spaces or
> special characters, then it should be protected by single or double
> quotes (p 244). If I'm using an Amber negation operator '!' with a
> c-shell based system, the '!' symbol should be interpreted as a
> "history" command regardless of the use of single or double quotes.

Yes, that is correct. man blurb:
       History substitutions begin with the character `!'. They may begin
       anywhere in the input stream, but they do not nest. The `!' may be
       preceded by a `\' to prevent its special meaning; for convenience, a
       `!' is passed unchanged when it is followed by a blank, tab, newline,
       `=' or `('. History substitutions also occur when an input line begins
       with `^'. This special abbreviation will be described later. The
       characters used to signal history substitution (`!' and `^') can be
       changed by setting the histchars shell variable. Any input line which

> Should I use a '\' in front of the '!' to protected from the shell?

Yes \! works:
tcsh> echo '~!@#$%'
@: Event not found.
tcsh> echo '~\!@#$%'
~!@#$%

The tcsh man page suggests other options: especially useful would be !(
For example, ontop of p244:
'[@C= & !(@CA,C)]'

Scott

-----------------------------------------------------------------------
The AMBER Mail Reflector
To post, send mail to amber_at_scripps.edu
To unsubscribe, send "unsubscribe amber" to majordomo_at_scripps.edu