I am new to shell scripting and i have wriiten a script to flag values within a if loop but if i try
- by user316360
#!/bin/sh
cat PLAYARTE_TXT.txt|while read line
do
count1=$(echo $line|wc -c)
a=37
if [[ $count1 -eq $a ]];
then
b=0
else
c=1
break
fi
done
if [ "$b" -eq "0" -a "$c" -ne "1" ];
then
echo success
else
echo failure
fi
exit 0