Sponsored Content
Full Discussion: Searching inverted lines
Top Forums Shell Programming and Scripting Searching inverted lines Post 302600181 by bartus11 on Monday 20th of February 2012 09:18:54 AM
Old 02-20-2012
Code:
awk -F_ '{a[$2"_"$1]=1}$0 in a' file

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sed searching across lines

hi, i'm making now a bash script, that runs some compiler... i want to take only errors form its output eg: output: bla bla bla ... erros is 1324546 the bla bla bla bla bla bla... ... and i want to get only erros is 1324546 the bla bla bla (11 Replies)
Discussion started by: miechu
11 Replies

2. Shell Programming and Scripting

difference between double inverted coma and single inverted comma

Whats the basic difference between double inverted comma and single inverted comma and no comma applied at all? Eg1 if Eg2 if iEg3 f (1 Reply)
Discussion started by: abhisekh_ban
1 Replies

3. Shell Programming and Scripting

lines searching >>

hi guys! I`ll really appreciate your help. The situation is: i have a log file, and i need to get the needed lines from it. linecount=$(cat -n http.log | grep ALERT | awk '{print $1}' | wc -l) lines=$(cat -n http.log | grep ALERT | awk '{print $1}') 1-string gets the number of found lines... (2 Replies)
Discussion started by: neverhood
2 Replies

4. Shell Programming and Scripting

Searching for lines ending with }

I'm trying to search for lines ending with "}" with the following command but am not getting any output. grep '\}$' myFile.txt I actually want to negate this (i.e. lines not ending with "}"), but I guess that should be easier once I find the command that finds it? (11 Replies)
Discussion started by: BootComp
11 Replies

5. UNIX for Dummies Questions & Answers

Searching for lines in a file?

What is the best way to display lines in a log file that begin with a certain string? Preferably I would like to 'print' them to a file. I guess I would use 'cat' for that? There are two types of line I would like to get at - each begins with a different two words. It would be something... (8 Replies)
Discussion started by: Sepia
8 Replies

6. Shell Programming and Scripting

Searching for lines in textfiles

Hello all, I've a problem. I've two logfiles and i need to find lines in the second file by using information from the first file. First I need to extract a searchpattern from the first file. Its like abc=searchpattern&cde=. All between abc= and &cde= is the pattern I need to find in the second... (2 Replies)
Discussion started by: Avarion
2 Replies

7. Shell Programming and Scripting

Perl searching special words in lines

Hi , i am a new with perl, i want to made a script that find in file rows that start with specil words, as an example a line will start with" ............................................. specialword aaa=2 bbb=5 ............................................. and to put this in a new file... (3 Replies)
Discussion started by: alinalin
3 Replies

8. Shell Programming and Scripting

Insert tags in lines after searching for a word

Hi, I am new to Unix and this is my first post on this forum. I am trying to convert a file into an xml. In my input I want to search for any line that starts with a 'F' and make it a tag in the xml. See below for the input and output. Input : <Payment> <REFERENCE>78</REFERENCE> F123 : ... (7 Replies)
Discussion started by: akashgov
7 Replies

9. UNIX for Dummies Questions & Answers

Add lines after searching for a pattern

Hi, I have 2 files like below. File A: apple mango File B: start abc def apple ghi end start cba fed (4 Replies)
Discussion started by: jayadanabalan
4 Replies

10. Shell Programming and Scripting

Searching for pattern and remove the lines

Hi , I want to remove the specific pattern and remove those lines from file using shell script. i want to remove these lines <?xml version='1.0' encoding='UTF-8'?> <row_set> </row_set> my input file has content like this. file name: sample.xml <?xml version='1.0'... (4 Replies)
Discussion started by: nukala_2
4 Replies
indxbib(1)							   User Commands							indxbib(1)

NAME
indxbib - create an inverted index to a bibliographic database SYNOPSIS
indxbib database-file... DESCRIPTION
indxbib makes an inverted index to the named database-file (which must reside within the current directory), typically for use by look- bib(1) and refer(1). A database contains bibliographic references (or other kinds of information) separated by blank lines. A bibliographic reference is a set of lines, constituting fields of bibliographic information. Each field starts on a line beginning with a `%', followed by a key-letter, then a blank, and finally the contents of the field, which may continue until the next line starting with `%'. indxbib is a shell script that calls two programs: /usr/lib/refer/mkey and /usr/lib/refer/inv. mkey truncates words to 6 characters, and maps upper case to lower case. It also discards words shorter than 3 characters, words among the 100 most common English words, and num- bers (dates) < 1000 or > 2099. These parameters can be changed. indxbib creates an entry file (with a .ia suffix), a posting file (.ib), and a tag file (.ic), in the working directory. FILES
/usr/lib/refer/mkey /usr/lib/refer/inv x.ia entry file x.ib posting file x.ic tag file x.ig reference file ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |Availability |SUNWdoc | +-----------------------------+-----------------------------+ SEE ALSO
addbib(1), lookbib(1), refer(1), roffbib(1), sortbib(1), attributes(5) BUGS
All dates should probably be indexed, since many disciplines refer to literature written in the 1800s or earlier. indxbib does not recognize pathnames. SunOS 5.10 14 Sep 1992 indxbib(1)
All times are GMT -4. The time now is 07:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy