? about single quote-double quote

? about single quote-double quote

Post by Newbie JrSysAdm » Fri, 10 Aug 2001 07:43:35



does anyone have a link to a summary of the distinction made in
solaris (unix) between the single and double quotes? i'm running into
all sorts of meaningful distinctions as i learn to write better
scripts, having falsely assumed there were few issues here based on
some simple echo/command line equivalences. i assume there's some
thematic unity here i could learn, as opposed to memorizing each
application. as always, i appreciate any help.
 
 
 

? about single quote-double quote

Post by Logan Sh » Fri, 10 Aug 2001 14:17:30




>does anyone have a link to a summary of the distinction made in
>solaris (unix) between the single and double quotes? i'm running into
>all sorts of meaningful distinctions as i learn to write better
>scripts, having falsely assumed there were few issues here based on
>some simple echo/command line equivalences. i assume there's some
>thematic unity here i could learn, as opposed to memorizing each
>application. as always, i appreciate any help.

Like wildcards, they're processed by the shell.  With single quotes,
not much processing happens to the quoted material.  With double
quotes, variables that are found are expanded to their values, as are
other things (like backticks, which run a command).

See the manual page for your shell for more information.

  - Logan
--
"Our grandkids love that we get Roadrunner and digital cable."
(Adverti*t for Time Warner cable TV and internet access, July 2001)

 
 
 

1. REGULAR EXPRESSIONS; PERL/AWK/SED; SINGLE QUOTES/DOUBLE QUOTES

Hi,

I am trying to look for the string

.uk,|/|end-of-string

this regular expression can be constructed as follows:

'\.uk,|/|$'

Now, suppose I stick the text uk into a variable called $suffix.
I can no longer use single quotes, because I destroy the meaning of
$suffix. If I use double quotes, though, then i Destroy the special
meaning of the metacharacter $.

"\.$suffix,|/|$"

Help!

Never mind,

I wound up using "\.$suffix"',|/|$', but this problem is so persistent
and pervasive in awk, csh, sed, and even perl that I wonder if there
are better-documented solutions.

Also, what is csh's equivalent of the \b,\w,\s constructs in perl?

Sent via Deja.com http://www.deja.com/
Before you buy.

2. Linux on the desktop just plain stinks!!!!

3. replace single quote to double quote with an example

4. tar problem

5. Problem in sed using double quotes and single quotes

6. Netscape's Free EDU server- Multi-Domains?

7. replace single quote to double quote with an example

8. Security concerns over local wu-ftpd setup.

9. Double quotes within double quotes (no apostrophes)

10. replace single quote by escaped single quote

11. Q: sh: Can I quote '"' in a double quoted string?

12. What is the difference between single and double quotes?

13. Single/double quotes in shell ?