Issue with ls command inside script

Hi ,
DIR1 has only one file with .txt extension , trying to get the size of that file using the following script

#!/bin/ksh
foldr_1="/etc/DIR1"
 #echo "$foldr_1"
 
  sze_fdr1=$(ls -ltr foldr_1/*.txt |awk '{ print $5 }')
  
  echo "$sze_fdr1"
  
After executing the above script getting the following error
foldr_1/*.txt: No such file or directory 

please help

A dollar prefix is missing for foldr_1 in the ls statement line

1 Like