Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Search file and print everything except multiple search terms Post 302939050 by seekryts15 on Saturday 21st of March 2015 05:24:05 PM
Old 03-21-2015
thanks everyone and sorry for the late response. I was able to figure it out with other search terms.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to search a large file with a list of terms in another file

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

awk: Multiple search patterns & print in an one liner

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

Search and print a certain number in a file

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

Grep multiple search terms with context

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

Perl - use search keywords from array and search a file and print 3rd field when matched

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

Search between two search strings and print the value

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

Grep? - using a file of terms to search another file when the information is on a different line

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

How to use a grep search to search for a specific string within multiple directories?

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

Search for Multiple strings in a given date range and print the Group if they exists

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
WebService::MusicBrainz::Track(3pm)			User Contributed Perl Documentation		       WebService::MusicBrainz::Track(3pm)

NAME
WebService::MusicBrainz::Track SYNOPSIS
use WebService::MusicBrainz::Track; my $ws = WebService::MusicBrainz::Track->new(); my $response = $ws->search({ TITLE => 'Same in any language' }); my $track = $response->track(); # grab the first one from list print $track->title(), " - ", $track->artist()->name(), " "; # OUTPUT: Same In Any Language - I Nine DESCRIPTION
This module is used to search the MusicBrainz database about track information. METHODS
new() This method is the constructor and it will call for initialization. query() This method will return the cached WebService::MusicBrainz::Query object. search() This method will search the MusicBrainz database about track related information. The only argument is a hashref to define the search parameters. my $ws = WebService::MusicBrainz::Track->new(); $ws->search({ TITLE => 'when the stars go blue' }); $ws->search({ TITLE => 'blue', OFFSET => 100 }); $ws->search({ ARTIST => 'Ryan Adams', TITLE => 'when the stars go blue' }); $ws->search({ RELEASE => 'Gold', TITLE => 'when the stars go blue' }); $ws->search({ DURATION => 200000, TITLE => 'when the stars go blue' }); $ws->search({ TRACKNUM => 7, TITLE => 'when the stars go blue' }); $ws->search({ ARTISTID => 'c80f38a6-9980-485d-997c-5c1a9cbd0d64', TITLE => 'when the stars go blue' }); $ws->search({ RELEASEID => '433adbc2-382f-4f3a-9ce9-401f221f5b3b', TITLE => 'when the stars go blue' }); $ws->search({ LIMIT => 5, TITLE => 'when the stars go blue' }); $ws->search({ MBID => 'bd08eddf-b811-4653-b56b-892292c291bc', INC => 'artist' }); $ws->search({ MBID => 'bd08eddf-b811-4653-b56b-892292c291bc', INC => 'releases' }); $ws->search({ MBID => 'bd08eddf-b811-4653-b56b-892292c291bc', INC => 'puids' }); $ws->search({ MBID => 'bd08eddf-b811-4653-b56b-892292c291bc', INC => 'artist-rels' }); $ws->search({ MBID => 'bd08eddf-b811-4653-b56b-892292c291bc', INC => 'release-rels' }); $ws->search({ MBID => 'bd08eddf-b811-4653-b56b-892292c291bc', INC => 'track-rels' }); $ws->search({ MBID => 'bd08eddf-b811-4653-b56b-892292c291bc', INC => 'url-rels' }); Multiple INC params can be delimited by whitespace, commas, or + characters. $ws->search({ MBID => 'bd08eddf-b811-4653-b56b-892292c291bc', INC => 'artist url-rels' }); $ws->search({ MBID => 'bd08eddf-b811-4653-b56b-892292c291bc', INC => 'artist,url-rels' }); $ws->search({ MBID => 'bd08eddf-b811-4653-b56b-892292c291bc', INC => 'artist+url-rels' }); AUTHOR
Bob Faist <bob.faist@gmail.com> COPYRIGHT AND LICENSE
Copyright 2006-2007 by Bob Faist This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
http://wiki.musicbrainz.org/XMLWebService perl v5.10.1 2009-12-06 WebService::MusicBrainz::Track(3pm)
All times are GMT -4. The time now is 12:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy