www.delorie.com/gnu/docs/textutils/coreutils_99.html   search  
 
Buy GNU books!


GNU Core-utils

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

16.3.4 String tests

These options test string characteristics. Strings are not quoted for test, though you may need to quote them to protect characters with special meaning to the shell, e.g., spaces.

`-z string'
True if the length of string is zero.

`-n string'
`string'
True if the length of string is nonzero.

`string1 = string2'
True if the strings are equal.

`string1 != string2'
True if the strings are not equal.


  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003