help-bash
[Top][All Lists]
Advanced

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

Re: Deleting files


From: michael-franzese
Subject: Re: Deleting files
Date: Mon, 22 Feb 2021 07:39:03 +0100

How can I write the following compactly

if (( nargs > 2 )); then
    if [[ "${3}" == "t" ]]; then
        remove_file=true
    fi
fi






> Sent: Monday, February 22, 2021 at 4:05 PM
> From: "Russell Lewis" <russl5445@gmail.com>
> To: michael-franzese@gmx.com
> Cc: "help-bash" <help-bash@gnu.org>
> Subject: Re: Deleting files
>
> Sounds like you want rsync.  :)
>
> Russ
>
> On Sun, Feb 21, 2021, 18:38 <michael-franzese@gmx.com> wrote:
>
> > I have two directories with files, one is the "source", the other
> > "destination". I would like to have a script that checks file
> > in "source". If file name and size matches that at "destination",
> > the file at "source" is deleted. Preferably using bash.
> >
> > Is it good enough to use blocksize for comparisons?
> >
> >
>



reply via email to

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