Hi
I want my script to define an empty array. array values should be added if predefined condition gets true. for this what i have done is
declare -a FILES
file_count=0
if [ "$file_ext" != "$SUPPORTED_FILE_TYPE" ] ; then
echo "$file_ext is not supported for this task."
else
$FILES[$file_count] = $filename
file_count=$file_count+1
fi
when executing this script i am getting some error like this
linux-softwares/launchers/join_files.sh: 51: [0]: not found