help-bash
[Top][All Lists]
Advanced

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

Organising conditions


From: hancooper
Subject: Organising conditions
Date: Mon, 02 Aug 2021 13:52:00 +0000

I am using some conditions and would like some assessments on the following. 
For instance, are
they all valid?

if [[ -d "$dir" && ! $list_raw ]]; then
tmpfile=$oldfile
fi

if [[ -d "$dir" ]] && [[ ! $list_raw ]]; then
tmpfile=$oldfile
fi

if [[ (-d "$dir") && (! $list_raw) ]]; then
tmpfile=$oldfile
fi

if ([[ -d "$dir" && ! $list_raw ]]); then
tmpfile=$oldfile
fi

reply via email to

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