Guys,
I have a requirement like below
my cfg file(sam.cfg) has
path=/u/sample/test/
path=/u/sample1/test1/
path=/u/sample2/test2/
days=10
file=*.log
My script is below,
#!/bin/sh
./u/sample/sam.cfg
while read line
do
find $path -name "$file" -mtime +$days -exec ls -la {} \; 2> /dev/null > sam.log
done < sam.cfg
if i execute this, this is only finding the files under path /u/sample2/test2/
. (taking the last path mentioned in cfg).
Its not finding the files from the ( path=/u/sample/test/
) and ( path=/u/sample1/test1/
)
Could you please anyone help me on this?
Appreciate your help!!!
Thanks,