Sponsored Content
Full Discussion: What does -f do
Top Forums UNIX for Dummies Questions & Answers What does -f do Post 11319 by ghoti on Monday 3rd of December 2001 07:28:06 AM
Old 12-03-2001
BASH "if" switches

When I was trying to find these conditional tests, I was finding it very difficult to locate any of these.
Hopefully this list will help for BASH shell users.
Usage:

if [ switch variable ]
eg:

if [ -e "$filename" ]; then
do
something.....
done


where switch and variable are one of the following:

switch variable
-n <variable> tests for non-empty variable
-e <filename> test for existence of file
-L <filename> tests if file is a link to another file
-f <filename> tests if is a regular file
-z <variable> tests if variable is empty
-d <directory> tests for existence of directory
-eq used instead of = (equal)
-neq used instead of != (not equal)
-lt used instead of < (less than)
-gt used instead of > (greater than)
-ge used instead of >= (greater than or equal)
-le used instead of <= (less than or equal)

hope this helps somebody....
 
Tcl_UniCharIsAlpha(3)					      Tcl Library Procedures					     Tcl_UniCharIsAlpha(3)

__________________________________________________________________________________________________________________________________________________

NAME
Tcl_UniCharIsAlnum, Tcl_UniCharIsAlpha, Tcl_UniCharIsControl, Tcl_UniCharIsDigit, Tcl_UniCharIsGraph, Tcl_UniCharIsLower, Tcl_UniCharIsPrint, Tcl_UniCharIsPunct, Tcl_UniCharIsSpace, Tcl_UniCharIsUpper, Tcl_UniCharIsWordChar - routines for classification of Tcl_UniChar characters SYNOPSIS
#include <tcl.h> int Tcl_UniCharIsAlnum(ch) int Tcl_UniCharIsAlpha(ch) int Tcl_UniCharIsControl(ch) int Tcl_UniCharIsDigit(ch) int Tcl_UniCharIsGraph(ch) int Tcl_UniCharIsLower(ch) int Tcl_UniCharIsPrint(ch) int Tcl_UniCharIsPunct(ch) int Tcl_UniCharIsSpace(ch) int Tcl_UniCharIsUpper(ch) int Tcl_UniCharIsWordChar(ch) ARGUMENTS
int ch (in) The Tcl_UniChar to be examined. _________________________________________________________________ DESCRIPTION
All of the routines described examine Tcl_UniChars and return a boolean value. A non-zero return value means that the character does belong to the character class associated with the called routine. The rest of this document just describes the character classes associated with the various routines. Note: A Tcl_UniChar is a Unicode character represented as an unsigned, fixed-size quantity. CHARACTER CLASSES
Tcl_UniCharIsAlnum tests if the character is an alphanumeric Unicode character. Tcl_UniCharIsAlpha tests if the character is an alphabetic Unicode character. Tcl_UniCharIsControl tests if the character is a Unicode control character. Tcl_UniCharIsDigit tests if the character is a numeric Unicode character. Tcl_UniCharIsGraph tests if the character is any Unicode print character except space. Tcl_UniCharIsLower tests if the character is a lowercase Unicode character. Tcl_UniCharIsPrint tests if the character is a Unicode print character. Tcl_UniCharIsPunct tests if the character is a Unicode punctuation character. Tcl_UniCharIsSpace tests if the character is a whitespace Unicode character. Tcl_UniCharIsUpper tests if the character is an uppercase Unicode character. Tcl_UniCharIsWordChar tests if the character is alphanumeric or a connector punctuation mark. KEYWORDS
unicode, classification Tcl 8.1 Tcl_UniCharIsAlpha(3)
All times are GMT -4. The time now is 07:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy