Test Command Assignment Help

Assignment Help: >> Advanced Shell Scripts - Test Command

The test command

To evaluate the conditional expressions the test command is used.

Syntax

test expression

or

[ expression ]

For applying Integer Operator using test command

Operator                          Description

int1 -eq int2                     Returns true if int1 is equal to int2

int1 -ge int2                     Returns true if int1 is greater than or equal to int2

int1 -gt int2                     Returns true if int1 is greater than int2

int1 -le int2                      Returns true if int1 is less than or equal to int2

int1 -lt int2                      Returns true if int1 is less than int2

int1 -ne int2                     Returns true if int1 is not equal to int2

Table 1

For Applying String Operator using test command

1191_test comand.png

Table 2

2255_test command.png

1841_test command1.png

Table 3

For Applying File Operator using test command

1436_test command2.png

Table 4

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd