09-29-2008
this is what i can think of:
1. search for that letter by hitting /L (if L is what you want to search)
2. go to line 1 by pressing :1
3. go to the 100th occurrence of the last search by typing 100n
edit: 100n means - repeat the n command 100 times
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I file that has all the status for one day (24hours). Now what I want to do is to count the occurence of a string in its output hourly like for example count occurance of successful or asynchronous clear destinon for every hour and redirect it to file. Please see sample file below. Please... (2 Replies)
Discussion started by: ayhanne
2 Replies
2. UNIX for Dummies Questions & Answers
Hi All,
How can i replace the n'th occurance in a file. ?
I have a property file like
EAR;_TrackingEAR;META-INF/application.xml;xml;context-root;1;valeur
EAR;_TrackingEAR;META-INF/application.xml;xml;context-root;2;valeur2... (2 Replies)
Discussion started by: subin_bala
2 Replies
3. Shell Programming and Scripting
Hi
I have a file which contains the following two lines which are same But I would like to insert the value=8.8.8.8 in the 1st occurance line and value=9.9.9.9 in the 2nd occurance line.
<parameter name="TestIp1" value="">
<parameter name="TestIp1" value="">
Please suggest (1 Reply)
Discussion started by: madhusmita
1 Replies
4. What is on Your Mind?
This is my 100th post! I want to thank UNIX.com for teaching me a lot. I joined here with no knowledge of UNIX at all. I've learned so many while lurking in the shadows of UNIX.com and I've learned a lot more while trying to help other people's problem.
So, to the forum and all its mods and... (3 Replies)
Discussion started by: angheloko
3 Replies
5. Shell Programming and Scripting
HI please let me know if there is any command to search and replace only the last occurence of a string in aline.
Eg:
" This cat is a cat with a tail longer of all cat."
I need to replace only the last "cat" in the above line.
thanks (3 Replies)
Discussion started by: harikris614
3 Replies
6. Shell Programming and Scripting
Hi,
I have hunted for an answer to this but still can't come up with a working solution.
How do I delete the last of a non unique line
The lines I am looking for is
case "$0" in
esac
This can appear n times I only want the last deleted.
I have tried with sed and... (1 Reply)
Discussion started by: miyoung999
1 Replies
7. Shell Programming and Scripting
Hi all,
I have file structure as file.log
84t-rw-r--r-- 1 emily04 us_cms 24492717 Oct 5 13:29 vgtree_84_1_K3L.root
85t-rw-r--r-- 1 emily04 us_cms 50410380 Oct 5 16:06 vgtree_85_1_uZv.root
85t-rw-r--r-- 1 emily04 us_cms 50567380 Oct 5 16:06 vgtree_85_1_hjv.root
86t-rw-r--r-- 1 emily04... (4 Replies)
Discussion started by: emily
4 Replies
8. Shell Programming and Scripting
Good afternoon all,
I want to ask how to change some letter in my file with other letter in spesific line
eg.
data.txt
1
1
1
0
0
0
0
for example i want to change the 4th line with character 1.
How could I do it by SED or AWK.
I have tried to run this code but actually did not... (3 Replies)
Discussion started by: weslyarfan
3 Replies
9. Shell Programming and Scripting
Hi I want to replace only the last occurance of "union all" in input file with ";"
I tried with sed 's/union all/;/g' in my input file, it replaced in all lines of input file
Eg:
select column1,column2 from test1 group by 2 union all
select column1,column2 from test2 group by 2 union all
... (9 Replies)
Discussion started by: antosr7
9 Replies
LEARN ABOUT DEBIAN
search.h
search.h(3HEAD) Headers search.h(3HEAD)
NAME
search.h, search - search tables
SYNOPSIS
#include <search.h>
DESCRIPTION
The <search.h> header defines the ENTRY type for structure entry, which includes the following members:
char *key
void *data
and defines ACTION and VISIT as enumeration data types through type definitions as follows:
enum { FIND, ENTER } ACTION;
enum { preorder, postorder, endorder, leaf } VISIT;
The size_t type is defined as described in <sys/types.h>. See types.h(3HEAD).
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
SEE ALSO
hsearch(3C), insque(3C), lsearch(3C), tsearch(3C), types.h(3HEAD), attributes(5), standards(5)
SunOS 5.10 10 Sep 2004 search.h(3HEAD)