to print the files that ends with .sh extension
Hi ,
I need to get the list of files in the directory that doesn't end with .sql
extension
iam trying the follwing program but i couldn't
for j in `find $LOG_DIR -type f`
do
if [ `ls $j |grep .sql` != sql ]
{
then
echo "script $j doesn't ends with .sql extension"
}
the above logic is printing the filenames but the condition is not satisfying so can you please help me out.
Thanks,
Naveen.
|