home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
vol_100
/
121_01
/
if.doc
< prev
next >
Wrap
Text File
|
1985-08-21
|
2KB
|
68 lines
IF (1) BDS C Users' Group IF (1)
NAME NAME
if - conditionally execute programs
SYNOPSIS SYNOPSIS
if if <condition> command arg1 arg2 ...
DESCRIPTION DESCRIPTION
__ If is a program which executes any other program (passing
command line arguments if specified) when a conditional test
is met.
The following conditions may be tested:
_________ ____ ___ Condition When met
-r filename filename is readable, i.e. exists
-w filename filename is writeable, i.e. not marked R/O
!(-r) filename filename is not readable, i.e. does not exist
!(-w) filename filename is not writeable, i.e. is marked R/O
str1 == str2 string 'str1' is the same as string 'str2'
str1 != str2 string 'str1' is different from string 'str2'
CAVEATS CAVEATS
This program was tested with v1.50 of the BDS C compiler
under CP/M 2.2. It should work with other versions of BDS C
and CP/M, but has not been tested.
EXAMPLES EXAMPLES
if -r a:data pip b:=a:data if file 'a:data' exists, use pip to
copy it to drive B
if $1 == link clink $2 -n if this is a line in a submit file
'test.sub', then:
'submit test link abc' will clink abc
'submit test lunk abc' won't clink abc
SEE ALSO SEE ALSO
sh(1)
BUGS BUGS
You can't run any of the builtin commands (DIR, ERA, REN,
__ SAVE, TYPE, USER) from if.
NOTES NOTES
Requires local.c for link.
-1-
This program was tested with v1.50 of the BDS C compiler