[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] Is there any need to quote $#?
From: |
konsolebox |
Subject: |
Re: [Help-bash] Is there any need to quote $#? |
Date: |
Sat, 9 Jan 2016 13:00:27 +0800 |
On Sat, Jan 9, 2016 at 11:10 AM, Peng Yu <address@hidden> wrote:
> Hi, Since $# is always a number, it seems that there is no need to
> quote it as "$#" at any time. Is it so? I just want to make sure.
I prefer quoting it for the sake of consistency in coding style and
peace of mind but there is no need, unless somehow there's a case
where you actually would have to non-temporarily set IFS to a value
with digits in it which is unlikely. It's more of just a practice.