this fails as it is not converting the variables $DBA_WORK_DIR and $DBA_LOG_DIR
-bash-3.00$ while read line ; do set -- $line; find $1 -name \"$2\" -mtime +"$3"; done < del_old_files.cfg
find: stat() error $DBA_WORK_DIR: No such file or directory
find: stat() error $DBA_LOG_DIR: No such file or directory
yet the find statement works outside of the while statement
find $DBA_WORK_DIR -name "*sybdba*" -mtime +30
produces the expected list of files
this fails as it is not converting the variables $DBA_WORK_DIR and $DBA_LOG_DIR
-bash-3.00$ while read line ; do set -- $line; find $1 -name \"$2\" -mtime +"$3"; done < del_old_files.cfg
find: stat() error $DBA_WORK_DIR: No such file or directory
find: stat() error $DBA_LOG_DIR: No such file or directory
yet the find statement works outside of the while statement
find $DBA_WORK_DIR -name "*sybdba*" -mtime +30
produces the expected list of files
output with set -x
-bash-3.00$ ./jjh
+ read line
+ set -- '$DBA_WORK_DIR' '*sybdba*' 30
+ find '$DBA_WORK_DIR' -name '"*sybdba*"' -mtime +30
find: stat() error $DBA_WORK_DIR: No such file or directory
+ read line
+ set -- '$DBA_LOG_DIR' '*sybdba*' 30
+ find '$DBA_LOG_DIR' -name '"*sybdba*"' -mtime +30
find: stat() error $DBA_LOG_DIR: No such file or directory
+ read line
-bash-3.00$
How did you create your del_old_files.cfg? If you can, put in a real path instead of $DBA_WORK_DIR. Otherwise, you have to define these variables somewhere in the script, so that they contain path values