Link Search Menu Expand Document

Logic condition

#! /bin/bash

read -p "How old are you? " age 

# using -o is OR, -a is AND
if [ $age -lt 0 -o $age -gt 200 ]; then
    echo "number not acceptable"
    exit
fi

if [ $age -lt 64 -a $age -gt 26 ]; then
    echo "you are between 26 and 64"
    exit
fi

echo "let us continue"