I'm trying to make use of some common generic functions already present in the scripts loaded in the environment.
A variable VAR1 is declared and used in the generic functions.
Its value is also set in the generic function.
Now I need to use that generic function for PURGING of some old files matching a pattern which are older than x days.
The suggested syntax is
find.. -name LDS-* -mtime +${VAR1} \
-exec ls -l {} \; >> ${LOG_PURGEFILE} 2>&1
But
- find command does not work in sftp environment.
- I need to declare VAR1=x, but I cant set the variables in a sftp session.
CUZ Setting variables in an sftp session in not possible. They can only be set outside the sftp and referenced in it
So pls advise how do I go about it..
Pls help ASAP..