I have a list of owners and table has the file details with file owners, size, atime, mtime,...file full path. Suppose I want to know how many files the owner owns from table, with the help of for loop, is it possible?
I tried the below with where
clause but it seems I am missing something.
for i in `cat owner_name.txt`;do hive -e "use <DB name>;select * from <table name> where owner="$i"";done limit 10 >> single_use.log
here owner_name.txt
has list of owner-names which are matching with the owner column inside the table.