From fd3e1f9b498f7f381d505f875dceaa8b9878f756 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 25 Aug 2024 23:17:19 +0300 Subject: Update content for html --- gemfeed/2021-05-16-personal-bash-coding-style-guide.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gemfeed/2021-05-16-personal-bash-coding-style-guide.html') diff --git a/gemfeed/2021-05-16-personal-bash-coding-style-guide.html b/gemfeed/2021-05-16-personal-bash-coding-style-guide.html index c11d5840..16ac95c4 100644 --- a/gemfeed/2021-05-16-personal-bash-coding-style-guide.html +++ b/gemfeed/2021-05-16-personal-bash-coding-style-guide.html @@ -37,7 +37,7 @@
  • ⇢ ⇢ Quoting your variables
  • ⇢ ⇢ Prefer built-in commands over external commands
  • My additions
  • -
  • ⇢ ⇢ Use of 'yes' and 'no'
  • +
  • ⇢ ⇢ Use of 'yes' and 'no'
  • ⇢ ⇢ Non-evil alternative to variable assignments via eval
  • ⇢ ⇢ Prefer pipes over arrays for list processing
  • ⇢ ⇢ Assign-then-shift
  • @@ -189,7 +189,7 @@ http://www.gnu.org/software/src-highlite -->

    My additions



    -

    Use of 'yes' and 'no'


    +

    Use of 'yes' and 'no'



    Bash does not support a boolean type. I tend just to use the strings 'yes' and 'no' here. I used 0 for false and 1 for true for some time, but I think that the yes/no strings are easier to read. Yes, the Bash script would need to perform string comparisons on every check, but if performance is crucial to you, you wouldn't want to use a Bash script anyway, correct?

    -- cgit v1.2.3