Exforsys
+ Reply to Thread
Results 1 to 3 of 3

Testing On Unix

This is a discussion on Testing On Unix within the Software Testing forums, part of the Testing category; can you guide me how to test in unix...

  1. #1
    saikrishnaa is offline Junior Member Array
    Join Date
    Mar 2010
    Answers
    1

    Testing On Unix

    can you guide me how to test in unix


  2. #2
    moonlight is offline Banned Array
    Join Date
    Jul 2008
    Answers
    27
    Test is a condition evaluation command.The test command evaluates the expression if the value is True,returns a zero exit status; otherwise,a nonzero exit status is returned.test also returns a nonzero exit status if there are no arguments.


  3. #3
    Sandhya.Kishannag is offline Member Array
    Join Date
    Feb 2012
    Answers
    66
    We can test in UNIX with the help of commands along with some test conditions.They returns 0 for true and 1 for false.

    Syntax:test - either test condition or [ condition ]

    Strings are compared with =, !=, >, and <.
    For example, test "$1" = "yes" is true if $1 is "yes".

    Numbers are compared with -eq (equal), -ne (not equal), -lt (less than), -le (less than or equal), -gt (greater than), -ge (greater than or equal to).
    For example, test $1 -lt 4 means that $1 is a number less than 4.

    Here are some other conditions:
    test -r file True if file file exists and is readable.
    test -w file True if file file exists and is writeable.
    test -x file True if file file exists and is executable.
    test -d file True if file file exists and is a directory.
    test -s file True if file file exists and has a size greater than 0.
    test -z string True if string string exists is length 0.


    •    Sponsored Ads



Latest Article

Network Security Risk Assessment and Measurement

Read More...