help-bash
[Top][All Lists]
Advanced

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

Re: Deleting files


From: Chris F.A. Johnson
Subject: Re: Deleting files
Date: Mon, 22 Feb 2021 13:55:10 -0500 (EST)
User-agent: Alpine 2.22 (DEB 394 2020-01-19)

On Mon, 22 Feb 2021, michael-franzese@gmx.com wrote:
...
On Mon, Feb 22, 2021 at 02:15:24PM +0000, Chris Elvidge wrote:
[ "$3" ] && N="${3^}" && [ "$N" = "T" ] && remove_file=true

Or:

case $3 in [Tt]) remove_file=true;; esac

Can one do

case "$3" in [Tt]) remove_file=true;; esac

One can, but this is one of the few places where it is not necessary
to put the variable in quotes.

Would there be side effects?

No.

--
   Chris F.A. Johnson                         <http://cfajohnson.com/>
   =========================== Author: ===============================
   Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
   Pro Bash Programming: Scripting the GNU/Linux shell (2009, Apress)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]