Closed DininduSenanayake closed 2 months ago
Easier to with grep
. if the two files in question are a.apsimx
and b.apsimx
, then
APSIMX_FILES=($(ls $CONFIG_DIR/*.apsimx | grep -vE '/(a|b)\.apsimx$'))
grep -vE '/(a|b)\.apsimx$'
:
-v
: Inverts the match, selecting lines that do not match the pattern.-E
: Enables extended regular expressions.'/(a|b)\.apsimx$'
: This pattern matches filenames ending with either a.apsimx or b.apsimx.
Two .apsix files used to in ExampeConfig.txt file is on the same directory and has to be excluded from
${APSIMX_FILES}
variable which in turn will drop it fromModels
function