[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] What is : good for
From: |
Greg Wooledge |
Subject: |
Re: [Help-bash] What is : good for |
Date: |
Fri, 19 Feb 2016 17:19:54 -0500 |
User-agent: |
Mutt/1.4.2.3i |
On Fri, Feb 19, 2016 at 05:08:50PM -0500, David Niklas wrote:
> Why bother "expanding arguments and performing any specified
> redirections. " then?
"Expanding arguments" is for the use case I showed earlier:
: "${foo:=default}"
"Performing redirections" is probably for something like this:
: >file_i_want_truncated
Which of course is equivalent to:
>file_i_want_truncated
But maybe someone prefers to use the : there for aesthetic reasons.