We have two values
$a
$b
we need to compare the $a value with $b value
in case $b value is less than ($a - 3) or more than ($a + 3), then it will print fail.
example:
a=10
b=14
then it should fail.
For:
a=10
b=11
then it's ok.
For:
a=23
b=6
then it should fail.
awk
tag. Do you want your solution in awk or will plain bash do? – Edward Jul 14 '19 at 13:17help -m test | less
? – Cyrus Jul 14 '19 at 13:28