Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Rsync exclusion question



Josh Glover wrote:
2009/6/15 John Fremlin <john@example.com>:

Of course one *should* understand the basics of interpolation in any
language one uses. But the Best Practice is about avoiding
interpolation altogether unless you *know* you want it in a string,
and then understanding the rules as they apply to that string.
How is interpolation relevant to the (alleged) difference between "*.leases"
and '*.leases'?

I don't know, but it appears to be, given that switching to single
quotes has resolved Doug's problem.

Are you confused by me referring to (possible) wildcard expansion as
interpolation?

Yes. You started with the idea that wildcard expansion occurred in "strings". I don't think it does nor could I find an example of it occurring. The man pages I quoted state that it doesn't. That is anyway quite different from interpolation.

Then you wandered off into a digression about interpolation. That is indeed a key difference between "strings" and 'strings'.

However, it is not relevant to the alleged difference between "*.leases" and '*.leases', as far as I can see.

From the nomikai there are a few people curious to know what it is so I'm sure we'd appreciate any investigations ;-)

I've seen old Unix hands tripped up by shell interpolation many times.
It can lead to very serious bugs so I don't see how there are any excuses
for being muddled up.

Sure, we are in agreement here. I don't exactly understand what you
are arguing--do you think that the idea of avoiding interpolating
quotes unless you need them is a bad one?

Using the simplest string literal syntax sounds reasonable.

However, I think it's far more important to know what you're doing. On the other hand, as Al said, if you want to be an average IT guy then that might be asking too much.

Unfortunately, in the shell 'strings' are also quite strange as you cannot quote '. Maybe your idea is more fully appropriate to languages like Python which have more reasonable quoting systems.


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links