unix - Script fails when using a variable for paths -


the following script fails. if run manually giving absolute paths instead of dir works.

#!/bin/ksh export dir="/clocal/www/logs/ca" find  $dir -name "*gz" -mtime +2 -exec ls -lrt {} \; #working line : find . -name "*gz" -mtime +2 -exec ls -lrt {} \; 

the operating system being run under aix.


Comments

Popular posts from this blog

python - Mongodb How to add addtional information when aggregating? -

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

java - Incorrect order of records in M-M relationship in hibernate -