Im trying to find a file with x type and store that in a variable. It is working fine when i try to execute manually. If i try the same in a bash script it is displaying test_count='1
because of this "if" condition is failing.
Please find the code below :- `
usage_backup_dir=/test/usage_backup
DT_FILENAME=$(date +%Y%m%d);
export DT_FILENAME
test_count=$(find $usage_backup_dir -type f -name "Summary_$DT_FILENAME*.bdm_all_cases.lg.log" -exec cat {} + )
echo $test_count`