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

Re: Strange Bash Script Problem



On Tue, 13 Aug 2019 at 05:04, Lee <ler762@gmail.com> wrote:
> On 8/12/19, Greg Wooledge <wooledg@eeg.ccf.org> wrote:
> > On Mon, Aug 12, 2019 at 01:56:46PM -0400, Lee wrote:

>> What's the difference between ${d} and "${d}"?  Or is that a bashism
>> also? (all my scripts use /bin/sh so I'm pretty clueless wrt bash)
> >
> > For more details, see <https://mywiki.wooledge.org/Quotes>.
>
> Wow!  It's going to take me a while to understand the implications of
> all that, so I'll just stop here with a
> Thank you so much for the detailed explanation!

Don't stop!! :)

Quoting is the #1 priority thing you must understand for
shell scripting, until then any script you write is
relying on good fortune rather than good practice.

Here is the absolute minimum to know (it's only 3 lines):
https://mywiki.wooledge.org/Quotes#I.27m_Too_Lazy_to_Read.2C_Just_Tell_Me_What_to_Do

The #2 thing to know is where to go to learn
good practice:
https://mywiki.wooledge.org/BashGuide


Reply to: