I am new to shell scripting and i have wriiten a script to flag values within a if loop but if i try

Posted by user316360 on Stack Overflow See other posts from Stack Overflow or by user316360
Published on 2010-04-14T09:45:24Z Indexed on 2010/04/14 9:53 UTC
Read the original article Hit count: 180

Filed under:
|
#!/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

© Stack Overflow or respective owner

Related posts about shell

Related posts about script