diff --git a/tabledata/ex1.sh b/tabledata/ex1.sh index e08b7be..04162d0 100755 --- a/tabledata/ex1.sh +++ b/tabledata/ex1.sh @@ -11,6 +11,15 @@ do name=`echo $line | cut -d " " -f 1` age=`echo $line | cut -d " " -f 2` country=`echo $line | cut -d " " -f 3` -echo "Person $name (from $country) is $age years old" + +if [ $name != "#" ] +then + +if [ $country = "$2" -a $age -ge $3 ] +then + echo "Person $name (from $country) is $age years old" +fi + +fi done < $1