SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Pastimes : Computer Learning

 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext  
To: E. Charters who wrote (40915)4/29/2004 7:18:06 AM
From: d:oug  Read Replies (1) of 110581
 
"seriously... In what langwhich?"

More of a C'andwhich

#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include <stdlib.h>

#ifdef UNIX
#define SYSUNIX 1
#else
#define SYSUNIX 0
#endif

#ifdef DOS
#define SYSDOS 1
#else
#define SYSDOS 0
#endif

(or)
A search program to look into text files (.TXT)
Could e-mail it to you as an attached file.

Name of program is FIT for find it

Purpose:
Search a file for one or more patterns.
Display lines just prior/after each line containing a pattern.

Usage
fit pattern filename integer[e,l] [on,*] [off]
fit -1 filename integer[e,l] [on,*] [off]
fit -1 filename
fit pattern filename not

integer - number of earlier/later lines to display
These are the lines that occur just prior and just after
each of the lines containing the pattern.
Range for integer is 0 thru 9

[e] Only display earlier lines
[l] Only display later lines
[on] Prefix lines containing pattern with their file line number.
[*] Prefix lines containing pattern with the * character.
[off] Do not seperate breaks in output with a dashed line.
[-1] Be prompted for one or more patterns.
[not] Display only lines not containing the pattern.

All valid combinations of [e,l] [on,*] [off] are allowed.
4/13/98 dk
----------------------------------------------------------
fit alien xfile 7
fit alien xfile 7e
fit alien xfile 7l
fit alien xfile 7 on
fit alien xfile 7 *
fit alien xfile 7 off
fit alien xfile 0 off
fit alien xfile 7e on off
fit alien xfile not
----------------------------------------------------------
fit -1 filename
The user will be prompted for patterns
Terminate each pattern with a newline
Do not bracket patterns with quotation marks
When all patterns are entered, enter -end-
----------------------------------------------------------
Report TOU ViolationShare This Post
 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext