Script for looking for people of specific age and country done;
This commit is contained in:
parent
2f7b833d09
commit
4aae9a0f24
@ -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`
|
||||
|
||||
if [ $name != "#" ]
|
||||
then
|
||||
|
||||
if [ $country = "$2" -a $age -ge $3 ]
|
||||
then
|
||||
echo "Person $name (from $country) is $age years old"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
done < $1
|
||||
|
Loading…
Reference in New Issue
Block a user