Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] Rsync exclusion question
- Date: Fri, 12 Jun 2009 11:28:49 +0900
- From: John Fremlin <john@example.com>
- Subject: Re: [tlug] Rsync exclusion question
- References: <956ae5a90906100208k6ec1aeebnebb17f7534b8183a@example.com> <11380cb60906100242w7a13b869j5b4d3315a4125f53@example.com> <956ae5a90906100308l215adc81m1dcfbb54dc826472@example.com> <d8fcc0800906100527p59d4d548v42999d96e7ad066c@example.com> <956ae5a90906100547i2e610cct42b8b075c50b6d6@example.com> <d8fcc0800906100614s4c909d0fj8091e3bfe9926c18@example.com> <4A30D148.1090004@example.com> <d8fcc0800906110258y553b9712hcb55c5a3ed4b6d69@example.com> <956ae5a90906110321k54545d53rb3cbae6f7044aaa0@example.com> <d8fcc0800906110355h21af4adtce1ddc3d95164988@example.com>
- User-agent: Thunderbird 2.0.0.21 (X11/20090409)
Josh Glover wrote:I think the Best Practise to always use non-interpolating quotes unless you know you need interpolation is the way to go. That way,you don't need to understand the interpolation rules of your programming language all the way down to the metal.I don't know how you can include not understanding the language you are using in a Best Practice ;-)Seeing as the interpolation and wildcard expansion rules affect both the security and correctness of your scripts, spending a few minutes to understand these simple rules will not only save you time debugging (for certain) but also possibly prevent minor catastrophes. (Both over- and under- quoting cause problems.)I don't understand why the problem was allegedly fixed by changing between " and ' quotes; perhaps we haven't heard the full story.From the Bash manpageEnclosing characters in double quotes preserves the literal value of all characters within the quotes, with the exception of $, ‘, \, and, when history expansion is enabled, !. The characters $ and ‘ retain their special meaning within double quotes. The backslash retains its special meaning only when followed by one of the following characters: $, ‘, ", \, or <newline>. A double quote may be quoted within double quotes by preceding it with a backslash. If enabled, history expansion will be performed unless an ! appearing in double quotes is escaped using a backslash. The backslash preceding the ! is not removed. The special parameters * and @ have special meaning when in double quotes (see PARAMETERS below).From the BSD sh manpageSingle Quotes Enclosing characters in single quotes preserves the literal meaning of all the characters (except single quotes, making it impossible to put single-quotes in a single-quoted string). Double Quotes Enclosing characters within double quotes preserves the literal meaning of all characters except dollarsign ($), backquote (‘), and backslash (\). The backslash inside double quotes is historically weird, and serves to quote only the following characters: $ ‘ " \ <newline>. Otherwise it remains literal.
- Follow-Ups:
- Re: [tlug] Rsync exclusion question
- From: Josh Glover
- Re: [tlug] Rsync exclusion question
- From: Al Hoang
- References:
- [tlug] [TLUG] Rsync exclusion question
- From: Doug McLean
- Re: [tlug] [TLUG] Rsync exclusion question
- From: Clemens Schwaighofer
- Re: [tlug] [TLUG] Rsync exclusion question
- From: Doug McLean
- Re: [tlug] [TLUG] Rsync exclusion question
- From: Josh Glover
- Re: [tlug] [TLUG] Rsync exclusion question
- From: Doug McLean
- Re: [tlug] [TLUG] Rsync exclusion question
- From: Josh Glover
- Re: [tlug] Rsync exclusion question
- From: John Fremlin
- Re: [tlug] Rsync exclusion question
- From: Josh Glover
- Re: [tlug] Rsync exclusion question
- From: Doug McLean
- Re: [tlug] Rsync exclusion question
- From: Josh Glover
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] [OT] StumbleUpon in Japanese
- Next by Date: Re: [tlug] [OT] StumbleUpon in Japanese
- Previous by thread: Re: [tlug] Rsync exclusion question
- Next by thread: Re: [tlug] Rsync exclusion question
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links