----- Original Message -----
From: Paul M Foster <paulf@quillandmouse.com>
Date: Tuesday, May 11, 2004 0:10 am
Subject: Re: [SLUG] mplayer and symbols in file name
> On Mon, May 10, 2004 at 08:56:24PM -0400, Chad Perrin wrote:
>
> <snip>
>
> > I take it, then, that anything inside quotes is typically
> > interpreted by the shell, and the quotes only serve to group
> > elements of a statement together.
>
> In general, yes.
The input is broken up into words, separated by any character in $IFS (by default
space, tab, linefeed, not necessarily in that order). You can write to $IFS, to
make it convenient for you.
> That's true for double-quotes, but not for single-quotes. That is:
>
> something "$ANYTHING"
>
> would fetch the value for the variable ANYTHING and insert that
> into the quoted string. But
>
> something '$ANYTHING'
>
> would assume that $ANYTHING is a string literal. Backticks (`)
> behave similarly to double-quotes, but execute what lies
> inside the backtick-quoted string.
...
> An alternate way to execute something (besides backticks) is:
>
> NOW=$($DATE +%Y-%m-%d)
I believe that comes from ksh or bash; the only difference between $(...) and `...`
now is that $(...) is easier to nest.
(I hate web mail... if this looks odd, it's because I'm using web mail through IE on
XP.)
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.
This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 18:06:16 EDT