07-16-2009
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Folks,
I have a file with all fields defined by byte position, but any field can be empty so I cannot print lines based on a search of specific columns. I need to print all lines of this file where the string of two characters at byte position 100-101 contains the number 27. Any ideas?
... (4 Replies)
Discussion started by: HealthyGuy
4 Replies
2. Shell Programming and Scripting
Hi,
I have following requirement. Pls suggest.
To search a string in a file which is combination of character and number(always 9 digit, but numeric). if found then caputure the exit return code as 0 else 1 , if 0 then next job can be triggerd. If exit code is 1, should return a failure... (10 Replies)
Discussion started by: zooby
10 Replies
3. Shell Programming and Scripting
Hi Guys,
I am trying to write a perl script to search a string "Name" in the file "FILE" and also want to create a new file and push the searched string Name line along with 10 lines following the same.
can anyone of you please let me know how to go about it ? (8 Replies)
Discussion started by: sukrish
8 Replies
4. Shell Programming and Scripting
I woud like to substitue a string on a specific position for specific lines
I've got a file and I would like to change a specific string from "TOCHANGE" to "ABCABCAB"
For every line (except 1,2, 3 and the last one) , I need to check between the 9th and the 16th digits.
For the 3rd line, I... (7 Replies)
Discussion started by: BSF
7 Replies
5. Shell Programming and Scripting
What's the easiest way to search a file for a specific string and then look for other instances after that? I want to search for all Virtual Hosts and print out the Server Name and Document Root (if it has that info), while discarding the rest of the info.
Basically my file looks like this:
...... (6 Replies)
Discussion started by: Mbohmer
6 Replies
6. Shell Programming and Scripting
Hello all,
I need to print all the lines before a specific string and print a custom message 2 lines after that.
So far I have managed to print everything up the string, inclusively, but I can't figure out how to print the 2 lines after that and the custom message.
My code thus far is:... (4 Replies)
Discussion started by: SEinT
4 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I have log file which rolls out every second which is as this.
HttpGenRequest - -<!--OXi dbPublish--> <created="2014-03-24 23:45:37" lastMsgId="" requestTime="0.0333"> <response request="getOutcomeDetails" code="114" message="Request found no matching data" debug="" provider="undefined"/>... (3 Replies)
Discussion started by: karthikprakash
3 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I have logfile like this..
=== 2014-02-09 15:46:59,936 INFO RequestContext - URL: '/eyisp/sc/skins/EY/images/pickers/comboBoxPicker_Over.png', User-Agent: 'Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko': Unsupported with Accept-Encoding header
=== 2015-02-09... (8 Replies)
Discussion started by: kishk
8 Replies
9. Shell Programming and Scripting
Hi,
I have a file with hundreds of lines. I want to search for particular lines starting with 4000, search and replace the 137-139 position characters; which will be '000', with '036'. Can all of this be done without opening a temp file and then moving that temp file to the original file name.
... (7 Replies)
Discussion started by: dsid
7 Replies
10. 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
LEARN ABOUT CENTOS
tracker-search
tracker-search(1) User Commands tracker-search(1)
NAME
tracker-search - Search all content for keywords
SYNOPSIS
tracker-search [OPTION...] EXPRESSION [EXPRESSION...]
DESCRIPTION
tracker-search searches all indexed content for EXPRESSION. The resource in which EXPRESSION matches must exist (see --all for more infor-
mation). All results are returned in ascending order. In all cases, if no EXPRESSION is given for an argument (like --folders for example)
then ALL items in that category are returned instead.
EXPRESSION
One or more terms to search. The default operation is a logical AND. For logical OR operations, see -r.
OPTIONS
-?, --help-all
Display all help options available.
-l, --limit=N
Limit search to N results. The default is 10 or 512 with --disable-snippets.
-o, --offset=N
Offset the search results by N. For example, start at item number 10 in the results. The default is 0.
-r, --or-operator
Use OR for search terms instead of AND (the default)
-d, --detailed
Show the unique URN associated with each search result. This does not apply to --music-albums and --music-artists.
-a, --all
Show results which might not be available. This might bebecause a removable media is not mounted for example. Without this option,
resources are only shown if they exist. This option applies to all command line switches except
--disable-snippets
Results are shown with snippets. Snippets are context around the word that was searched for in the first place. This gives some idea
of if the resource found is the right one. Snippets require Full Text Search to be compile time enabled AND to not be disabled with
--disable-fts. Using --disable-snippets only shows the resources which matched, no context is provided about where the match
occurred.
--disable-fts
If Full Text Search (FTS) is available, this option allows it to be disabled for one off searches. This returns results slightly
using particular properties to match the search terms (like nie:title) instead of looking for the search terms amongst ALL proper-
ties. It is more limiting to do this, but sometimes searching without FTS can yield better results if the FTS ranking is off.
--disable-color
This disables any ANSI color use on the command line. By default this is enabled to make it easier to see results. --music-albums
and --music-artists.
-f, --files
Search for files of any type matching EXPRESSION (optional).
-s, --folders
Search for folders matching EXPRESSION (optional).
-m, --music
Search for music files matching EXPRESSION (optional).
--music-albums
Search for music albums matching EXPRESSION (optional).
--music-artists
Search for music artists matching EXPRESSION (optional).
-i, --images
Search for images matching EXPRESSION (optional).
-v, --videos
Search for videos matching EXPRESSION (optional).
-t, --documents
Search for documents matching EXPRESSION (optional).
-e, --emails
Search for emails matching EXPRESSION (optional). Returns a list of subjects for emails found.
-c, --contacts
Search for contacts matching EXPRESSION (optional). Returns a list of names and email addresses found.
--software
Search for software installed matching EXPRESSION (optional). Returns a list of desktop files and application titles found.
--software-categories
Search for software categories matching EXPRESSION (optional). Returns a list of urns and their categories (e.g. Settings, Video,
Utility, etc).
--feeds
Search through RSS feed information matching EXPRESSION (optional). Returns a list of those found.
-b, --bookmarks
Search through bookmarks matching EXPRESSION (optional). Returns a list titles and links for each bookmark found.
-V, --version
Print version.
SEE ALSO
tracker-store(1), tracker-stats(1), tracker-tag(1), tracker-info(1).
GNU
July 2009 tracker-search(1)