home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
VSCPPv8.zip
/
VACPP
/
IBMCPP
/
samples
/
COMPILER
/
GREP
/
HELP.C
< prev
next >
Wrap
Text File
|
1993-02-28
|
3KB
|
59 lines
/***************************************************************************/
/* */
/* MODULE NAME: HELP.C */
/* */
/* COPYRIGHT: */
/* ---------- */
/* Copyright (C) International Business Machines Corp., 1991,1992,1993. */
/* */
/* DISCLAIMER OF WARRANTIES: */
/* ------------------------- */
/* The following [enclosed] code is sample code created by IBM */
/* Corporation. This sample code is not part of any standard IBM product */
/* and is provided to you solely for the purpose of assisting you in the */
/* development of your applications. The code is provided "AS IS", */
/* without warranty of any kind. IBM shall not be liable for any damages */
/* arising out of your use of the sample code, even if they have been */
/* advised of the possibility of such damages. */
/* */
/* STATUS: VERSION 1, RELEASE 0, MODIFICATION 0 */
/* */
/***************************************************************************/
#include "grep.h"
#include <stdio.h>
void grepHelp(int helpType)
{
if (helpType == LINE_HELP)
{
printf("Usage:\n");
printf("grep [-flags] \"pattern\" [d:][\\path]node[.ext] [[d:][\\path]node[.ext]]...\n");
printf("Use -h for more help.\n");
}
else if (helpType == FULL_HELP)
{
printf("grep [/flags] \"pattern\" [d:][\\path]node[.ext] [[d:][\\path]node[.ext]]...\n");
printf(" a the search pattern is Absolute (i.e.,'.*...' have no special meaning)\n");
printf(" c show the count of occurrences found\n");
printf(" l will enable line number information\n");
printf(" n display the file name with matches only\n");
printf(" p pause when screen is full\n");
printf(" q Do not display the logo\n");
printf(" s subdirectory search\n");
printf(" v display the lines that do not have the given pattern\n");
printf(" y case sensitive\n");
printf(" z other help information\n");
}
else if (helpType == CMDS_HELP)
{
printf("The pattern is specified in a form\n");
printf("of regular expression notation where\n");
printf("1. A character not given special meaning matches itself\n");
printf("2. A ? matches any character.\n");
printf("3. A * matches any number of characters.\n");
}
return;
}