Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004
    Location
    Chennai
    Posts
    53

    Unanswered: diff between ' and "

    i have a small doubt.
    is the any diff between using a ' and " in find and grep commands????
    -Mathan
    For a quick pocket reference of oracle refer http://pocketoracle.blogspot.com/

  2. #2
    Join Date
    Jan 2004
    Location
    Bordeaux, France
    Posts
    320
    The difference is at shell level, not at grep level.

    Certain programs and utilities can still reinterpret or expand special characters in a quoted string. This is an important use of quoting, protecting a command−line parameter from the shell, but still letting the calling program expand it.

    When referencing a variable, it is generally advisable in enclose it in double quotes (" "). This preserves all special characters within the variable name, except $, ` (backquote), and \ (escape). [14] Keeping $ as a special character within double quotes permits referencing a quoted variable ("$variable"), that is, replacing the variable with its value

    Use double quotes to prevent word splitting. [15] An argument enclosed in double quotes presents itself as a single word, even if it contains whitespace separators.

    Single quotes (' ') operate similarly to double quotes, but do not permit referencing variables, since the special meaning of $ is turned off. Within single quotes, every special character except ' gets interpreted literally.

    Consider single quotes ("full quoting") to be a stricter method of quoting than double quotes ("partial
    quoting").
    Jean-Pierre.

  3. #3
    Join Date
    Feb 2004
    Location
    Chennai
    Posts
    53
    Thanks
    -Mathan
    For a quick pocket reference of oracle refer http://pocketoracle.blogspot.com/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •