#!/bin/bash cat 20210419.txt | while read line ; do countt=`hdfs dfs -ls /user/hive/warehouse/$line | grep Found | cut -d " " -f2` echo $line $countt done