Dear All
I had below mention file as my input file.
87980457 Jan 12 2008 2:00AM 1 60 BSC1
81164713 Jan 12 2008 3:00AM 1 60 BSC2
78084521 Jan 12 2008 4:00AM 1 60 BSC3
68385193... (3 Replies)
What Im basically trying to do is this:
I have a small script that can grep any parameter entered into a search string, then print to the screen the name of each file the parameter appears in as well as the file path, ie the directory.
The code Im using just for this is....
Directory... (3 Replies)
I have looked at almost every posting on here regarding, grep, sed, awk, nawk, perl methods to perform this function, but they are just not returning the results I hope to see.
Example File:
abcdef
123456
ghijkl
7890123
7890123
7890123
7890123
mnopqrs
456789
This is the most... (4 Replies)
Hi,
I have a file with the following contents:
COMPANY ABCD
TRUCKER JOE SMITH
TRUCK 456
PLATE A12345678
TRUCKER BILL JONES
TRUCK 789
PLATE B7894561
I need to create a script or search command that will search for this string '789' in the file. This string is unique and only... (7 Replies)
Hi,
I have a file with the following contents:
I need to create a script or search command that will search for this string 'ENDC' in the file. This string is unique and only occurs in one record. Once it finds the string, I would like it to return positions 101-109 ( this is the date of... (0 Replies)
Folks ,
I have a korn shell script that i have written for assembly, the variable that is a final result is returning hexadecimal, now the value is to be converted to binary and return the place holder in the binary that has a 1 in its place and send it to a variable assigned for the... (0 Replies)
Hi,
I'm trying to search a text file for a string: "energy(sigma->0)=". To do so, I executed the grep command, which returned many matches, for example:
energy without entropy = -112.16486170 energy(sigma->0) = -112.16520778
energy without entropy = -112.16488936 ... (5 Replies)
Hello all,
after spending hours of searching the web I decided to create an account here. This is my first post and I hope one of the experts can help.
I need to resolve a grep / sed / xargs / awk problem.
My input file is just like this:
----------------------------------... (6 Replies)
Hi,
I need a shell script, which would search the result values from another files.
1)execute " select column1 from table_name" query on the table.
2)Based on the result, need to be grep from .wft files.
could please explain about this.Below is the way i am using.
#!/bin/sh... (4 Replies)
Hi,
I am not a C programmer. The only C exposure I have is reading and completing the exercises from the C (ANSI C ) Programming Language book:o
At the moment, I am using the UNIX strings command to extract information for a binary file and grepping for a particular string and the value... (3 Replies)
Discussion started by: newbie_01
3 Replies
LEARN ABOUT DEBIAN
binsrch
BINSRCH(3WN) WordNettm Library Functions BINSRCH(3WN)NAME
bin_search, copyfile, replace_line, insert_line - general purpose functions for performing a binary search
SYNOPSIS
char *bin_search(char *key, FILE *fp);
void copyfile(FILE *fromfp, FILE *tofp);
char *replace_line(char *new_line, char *key, FILE *fp);
char *insert_line(char *new_line, char *key, FILE *fp);
DESCRIPTION
The WordNet library contains several general purpose functions for performing a binary search and modifying sorted files.
bin_search() is the primary binary search algorithm to search for key as the first item on a line in the file pointed to by fp. The delim-
iter between the key and the rest of the fields on the line, if any, must be a space. A pointer to a static variable containing the entire
line is returned. NULL is returned if a match is not found.
The remaining functions are not used by WordNet, and are only briefly described.
copyfile() copies the contents of one file to another.
replace_line() replaces a line in a file having searchkey key with the contents of new_line. It returns the original line or NULL in case
of error.
insert_line() finds the proper place to insert the contents of new_line, having searchkey key in the sorted file pointed to by fp. It
returns NULL if a line with this searchkey is already in the file.
NOTES
The maximum length of key is 1024.
The maximum line length in a file is 25K.
If there are no additional fields after the search key, the key must be followed by at least one space before the newline character.
SEE ALSO wnintro(3WN), morph(3WN), wnsearch(3WN), wnutil(3WN), wnintro(5WN).
WARNINGS
binsearch() returns a pointer to a static character buffer. The returned string should be copied by the caller if the results need to be
saved, as a subsequent call will replace the contents of the static buffer.
WordNet 3.0 Dec 2006 BINSRCH(3WN)