Script for looking for people of specific age and country done;

This commit is contained in:
Arkadiusz Hypki 2023-05-08 17:03:43 +02:00
parent 2f7b833d09
commit 4aae9a0f24

View File

@ -11,6 +11,15 @@ do
name=`echo $line | cut -d " " -f 1` name=`echo $line | cut -d " " -f 1`
age=`echo $line | cut -d " " -f 2` age=`echo $line | cut -d " " -f 2`
country=`echo $line | cut -d " " -f 3` country=`echo $line | cut -d " " -f 3`
if [ $name != "#" ]
then
if [ $country = "$2" -a $age -ge $3 ]
then
echo "Person $name (from $country) is $age years old" echo "Person $name (from $country) is $age years old"
fi
fi
done < $1 done < $1