Reading from EndPointsPriority.txt and finding that file name in other Directory
by parveen.gupta.23091987 from LinuxQuestions.org on (#5HJ1F)
EndPointsPriority.txt contains>>
0001105
0005074
0079557
Reading from EndPointsPriority.txt and finding that file name in other Directory
This is working >>>>>>>>>>>>
echo "Start"
ePFileName='../resources/EndPointsPriority.txt'
counteP=1
while IFS= read -r eP; do
# reading each line
echo "Line No. $counteP : $eP"
#issue on below line
for file in $(find /apps_01/CBK/T5G2Batch/dataTqr/ -iname "*0001105*" 2>/dev/null)
do
# if file does not exist, don't try to send it
[ -f "$file" ]||continue
echo "File found $file"
done
counteP=$( expr $counteP + 1 )
echo "new count $counteP"
done < $ePFileName
echo "End"
This is not working >>>>>>>>>>>>
echo "Start"
ePFileName='../resources/EndPointsPriority.txt'
counteP=1
while IFS= read -r eP; do
# reading each line
echo "Line No. $counteP : $eP"
#issue on below line
for file in $(find /apps_01/CBK/T5G2Batch/dataTqr/ -iname "*$eP*" 2>/dev/null)
do
# if file does not exist, don't try to send it
[ -f "$file" ]||continue
echo "File found $file"
done
counteP=$( expr $counteP + 1 )
echo "new count $counteP"
done < $ePFileName
echo "End"


0001105
0005074
0079557
Reading from EndPointsPriority.txt and finding that file name in other Directory
This is working >>>>>>>>>>>>
echo "Start"
ePFileName='../resources/EndPointsPriority.txt'
counteP=1
while IFS= read -r eP; do
# reading each line
echo "Line No. $counteP : $eP"
#issue on below line
for file in $(find /apps_01/CBK/T5G2Batch/dataTqr/ -iname "*0001105*" 2>/dev/null)
do
# if file does not exist, don't try to send it
[ -f "$file" ]||continue
echo "File found $file"
done
counteP=$( expr $counteP + 1 )
echo "new count $counteP"
done < $ePFileName
echo "End"
This is not working >>>>>>>>>>>>
echo "Start"
ePFileName='../resources/EndPointsPriority.txt'
counteP=1
while IFS= read -r eP; do
# reading each line
echo "Line No. $counteP : $eP"
#issue on below line
for file in $(find /apps_01/CBK/T5G2Batch/dataTqr/ -iname "*$eP*" 2>/dev/null)
do
# if file does not exist, don't try to send it
[ -f "$file" ]||continue
echo "File found $file"
done
counteP=$( expr $counteP + 1 )
echo "new count $counteP"
done < $ePFileName
echo "End"