03-09-2015
Is it just the four patterns "test", "comp", "des", and "site" that need to be matched, or any combination of up to four lower case letters?
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi-
I am trying to search a large file with a number of different search terms that are listed one per line in 3 different files. Most importantly I need to be able to do a case insensitive search.
I have tried just using egrep -f but it doesn't seam to be able to handle the -i option when... (3 Replies)
Discussion started by: dougzilla
3 Replies
2. Shell Programming and Scripting
I would like to print result of multiple search pattern invoked from an one liner. The code looks like this but won't work
gawk -F '{{if ($0 ~ /pattern1/) pat1=$1 && if ($0 ~ /pattern2/) pat2=$2} ; print pat1, pat2}'
Can anybody help getting the right code? (10 Replies)
Discussion started by: sdf
10 Replies
3. Shell Programming and Scripting
Hi,
I have a file that contains strings and numbers. I want to search for a particular string and then print out the numbers next to this string.
For example the file looks like in the file I want to search for the line
AFUE 0.
AOXI 0.
VFUE 600.
VOXI 1573.241
TFUE ... (2 Replies)
Discussion started by: lost.identity
2 Replies
4. Shell Programming and Scripting
I have a file that is a sort library in the format:
##def title1
content1
stuff1
content2
stuff2
##enddef
##def title2
etc..
I want to grep def and content and pull some trailing context from content
so the result would look something like: (1 Reply)
Discussion started by: Moe.Wilensky
1 Replies
5. Shell Programming and Scripting
Hi ,
I have been trying to write a perl script to do this job. But i am not able to achieve the desired result. Below is my code.
my $current_value=12345;
my @users=("bob","ben","tom","harry");
open DBLIST,"<","/var/tmp/DBinfo";
my @input = <DBLIST>;
foreach (@users)
{
my... (11 Replies)
Discussion started by: chidori
11 Replies
6. Shell Programming and Scripting
Based on the forums i have tried with grep command but i am unable to get the required output.
search this value /*------
If that is found then search for temp_vul and print
and also search until /*------- and print new_vul
Input file contains:
... (5 Replies)
Discussion started by: onesuri
5 Replies
7. UNIX for Dummies Questions & Answers
I have a flat file that looks like this, let's call it Chromosome_9.txt:
FT /Gene_Name="Guanyl-Acetylase 9"
FT /Gene_Number"36952"
FT /Gene_Name="Endoplasmic Luciferase"
FT /Gene_Number"36953"
FT ... (4 Replies)
Discussion started by: Twinklefingers
4 Replies
8. UNIX for Beginners Questions & Answers
Lets say I have a massive directory which is filled with other directories all filled with different c++ scripts and I want a listing of all the scripts that contain the string: "this string". Is there a way to use a grep search for that? I tried:
grep -lr "this string" *
but I do not... (3 Replies)
Discussion started by: Circuits
3 Replies
9. UNIX for Beginners Questions & Answers
Hi,
I am Searching for Multiple strings in a given date range and print the Group if they exists. the below is the format:
-------------------------------------------------------------------------------------------------------------------------
ID: FIRST ID
MESSAGE: Event Message... (5 Replies)
Discussion started by: linuxuser999
5 Replies
LEARN ABOUT NETBSD
apropos
APROPOS(1) BSD General Commands Manual APROPOS(1)
NAME
apropos -- search the complete content of all man pages
SYNOPSIS
apropos [-123456789Ccp] [-n Number of results] [-S machine] [-s section] query
DESCRIPTION
The apropos utility performs a full text search over the complete content of all man pages. It uses the FTS engine of Sqlite to perform the
search. The database is created with the help of makemandb(8) utility.
This implementation of the apropos utility is more sophisticated than the classical version of apropos. Like modern search applications, it
uses advanced techniques like stemming and term weighting to rank the matching results in decreasing order of relevance. By default apropos
will only display the top 10 matches in the output.
Quotes are optional for specifying multiword queries.
It supports the following options:
-1 Search only within section 1 manual pages.
-2 Search only within section 2 manual pages.
-3 Search only within section 3 manual pages.
-4 Search only within section 4 manual pages.
-5 Search only within section 5 manual pages.
-6 Search only within section 6 manual pages.
-7 Search only within section 7 manual pages.
-8 Search only within section 8 manual pages.
-9 Search only within section 9 manual pages.
-C Do not show the context of the match.
-c Do show the context of the match (default).
-n Output up to the specified number of search results. The default limit is 10.
-p Display all matching results and pipe them through a pager (defaulting to more(1)).
-S machine
Limit the search to the pages for the specified machine architecture. By default pages for all architectures are shown in the search
results.
-s section
Restrict the search to the specified section of the manual. By default, pages from all section are shown. This option is for back-
wards compatibility with the classic version of apropos, using it is equivalent to using the [123456789] options directly.
FILES
/var/db/man.db The Sqlite FTS database which contains an index of the manual pages.
SEE ALSO
man(1), whatis(1), makemandb(8)
HISTORY
The apropos command appeared in 3.0BSD. It was rewritten in NetBSD 6.0 to support full text search using Sqlite.
AUTHORS
Abhinav Upadhyay
BSD
April 21, 2012 BSD