Sponsored Content
Full Discussion: Grep Unique
Top Forums UNIX for Dummies Questions & Answers Grep Unique Post 302475764 by macbb1117 on Monday 29th of November 2010 11:01:44 PM
Old 11-30-2010
Grep Unique

Hello, I have a file with a list of car makes and specific information for each make. An example is:

@Audi:Warranty
@Audi:Pricing
@Audi:Colors
@Acura:Warranty
@Acura:Pricing
@Acura:Colors

and so on through a bunch of makes. I need to make a list in a selection box of just one name of each make. For example:

Audi
Acura
BMW
Buick

Any help is muchly appreciated! Thanks!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

grep unique occurrences

Hi, How do i grep unique occurrences from a file. I have a log file with multiple occurrences of 'foo' for instance. When i do: grep foo, I get all the lines that contain foo. Is there any way to get only one line for foo? Example file: foo at 09.01am Fri 11 May 2007 foo at 09.13am... (6 Replies)
Discussion started by: mz043
6 Replies

2. UNIX for Dummies Questions & Answers

Getting unique list of numbers using grep

Hi, I am going to fetch a list of numbers that starts with "0032" from a file with a format like the given below: " 0032459999 0032458888 0032457777 0032451111 0032452222 0032453333 0032459999 0032458888 0032457777 0032451111 0032452222 0032453333 " I want to get a unique... (6 Replies)
Discussion started by: tinku
6 Replies

3. Shell Programming and Scripting

grep for unique value

If i want to grep for a value in a file but display only unique value then which option can i use. ex: Values in the file IP <1.2.3.4> value <2> IP <1.2.3.4> value <2> IP <1.2.3.4> value <3> IP <1.2.3.5> value <1> i should get only the unique value (3 Replies)
Discussion started by: vls1210
3 Replies

4. UNIX and Linux Applications

grep file to find unique instances of username

hello - A SystemOut.log file has recurring entries that follow this format: Principal: auth9.nick.al.gov:389/USERNAME Over the course of a day thousands of lines similar to this are produced, with each username represented hundreds of times. I need to create a new file that shows... (4 Replies)
Discussion started by: 1075FJ40
4 Replies

5. Shell Programming and Scripting

grep with date & unique output

alert.log has the entries with ORA-XXXX, .... Mon Sep 24 15:08:09 2012 WARNING: inbound connection timed out (ORA-3136) Mon Sep 24 15:08:09 2012 WARNING: inbound connection timed out (ORA-3136) Mon Sep 24 15:08:09 2012 WARNING: inbound connection timed out (ORA-3136) Mon Sep 24 15:15:01... (4 Replies)
Discussion started by: Daniel Gate
4 Replies

6. UNIX for Dummies Questions & Answers

Grep to find matching patern and return unique values

Request: grep to find given matching patern and return unique values, eliminate the duplicate values I have to retrieve the unique folder on the below file contents like; /app/oracle/build_lib/pkg320.0_20120927 /app/oracle/build_lib/pkg320.0_20121004_prof... (5 Replies)
Discussion started by: Siva SQL
5 Replies

7. Shell Programming and Scripting

How to grep on unique id which has request and response on different lines?

Hi I want to find out those unique uids from the log file which have request and response. The log file format is as follows. This log has other irrelevant lines too but each uid should have request and reponse, I need those uids only 2013-04-03 10:51:01,808 INFO <?xml version="1.0"... (4 Replies)
Discussion started by: random_thoughts
4 Replies

8. Shell Programming and Scripting

Using grep and a parameter file to return unique values

Hello Everyone! I have updated the first post so that my intentions are easier to understand, and also attached sample files (post #18). I have over 500 text files in a directory. Over 1 GB of data. The data in those files is organised in lines: My intention is to return one line per... (23 Replies)
Discussion started by: clippertm
23 Replies

9. UNIX for Dummies Questions & Answers

Grep unique 1st column

Hello, I'm trying to used awk but am new to this. I have a file like this: Bob is a good boy Bob is a strange person Bob is a good dancer Jane can party Jane is a good girl Jane is batty I'd like to get this: Bob is a good boy is a strange person is a good dancer Jane... (4 Replies)
Discussion started by: Billyjo
4 Replies

10. UNIX for Beginners Questions & Answers

Grep or awk a unique and specific word across many fields

Hi there, I have data with similar structure as this: CHR START-SNP END-SNP REF ALT PATIENT1 PATIENT2 PATIENT3 PATIENT4 chr1 69511 69511 A G homo hetero homo hetero chr2 69513 69513 T C . hetero homo hetero chr3 69814 69814 G C . . homo homo chr4 69815 69815 C A hetero . . hetero is... (10 Replies)
Discussion started by: daashti
10 Replies
Color::Library(3pm)					User Contributed Perl Documentation				       Color::Library(3pm)

NAME
Color::Library - An easy-to-use and comprehensive named-color library VERSION
version 0.021 SYNOPSIS
use Color::Library; # Search for a sea blue color my $seablue = Color::Library->color("seablue"); # Search for a grey73 in the 'svg' and 'x11' dictionaries only my $grey73 = Color::Library->colour([qw/svg x11/] => "grey73"); # Find a bunch of colors at the same time my ($red, $green, $blue) = Color::Library->colors(qw/red green blue/); # Fetch the named color "aliceblue" from the SVG dictionary my $color = Color::Library->SVG->color("aliceblue"); # Prints out "aliceblue is #ff08ff" print $color->name, "is ", $color, " "; # Get a list of names in the svg dictionary my @names = Color::Library->SVG->names; # Get a list of colors in the x11 dictionary my @colors = Color::Library->dictionary('x11')->colors; DESCRIPTION
Color::Library is an easy-to-use and comprehensive named-color dictionary. Currently provides coverage for www (svg, html, css) colors, x11 colors, and more. DICTIONARIES
The following dictionaries are available in this distribution: Color::Library::Dictionary::SVG - Colors from the SVG specification Color::Library::Dictionary::X11 - Colors for the X11 Window System (rgb.txt) Color::Library::Dictionary::HTML - Colors from the HTML 4.0 specification Color::Library::Dictionary::IE - Colors recognized by Internet Explorer Color::Library::Dictionary::Mozilla - Colors recognized by Mozilla (ColorNames.txt) Color::Library::Dictionary::Netscape - Colors recognized by Netscape Color::Library::Dictionary::Windows - Colors from the Windows system palette Color::Library::Dictionary::VACCC - VisiBone Anglo-Centric Color Code Color::Library::Dictionary::NBS_ISCC - Centroids of the NBS/ISCC catalog Color::Library::Dictionary::NBS_ISCC::A - Dye Colors Color::Library::Dictionary::NBS_ISCC::B - Colour Terminology in Biology Color::Library::Dictionary::NBS_ISCC::F - Colors; (for) Ready-Mixed Paints Color::Library::Dictionary::NBS_ISCC::H - Horticultural Colour Charts Color::Library::Dictionary::NBS_ISCC::M - Dictionary of Color Color::Library::Dictionary::NBS_ISCC::P - Plochere Color System Color::Library::Dictionary::NBS_ISCC::R - Color Standards and Color Nomenclature Color::Library::Dictionary::NBS_ISCC::RC - Rock-Color Chart Color::Library::Dictionary::NBS_ISCC::S - Postage-Stamp Color Names Color::Library::Dictionary::NBS_ISCC::SC - Soil Color Charts Color::Library::Dictionary::NBS_ISCC::TC - Standard Color Card of America You can see a list of colors in any of these by reading their perldoc. For example: perldoc Color::Library::Dictionary::VACCC If you have any suggestions for more color dictionaries to integrate, contact me. METHODS
$dictionary = Color::Library->dictionary( <dictionary_id> ) Returns a Color::Library::Dictionary object corresponding to <dictionary_id> @dictionaries = Color::Library->dictionaries @dictionaries = Color::Library->dictionaries( <dictionary_id>, <dictionary_id>, ... ) $dictionaries = Color::Library->dictionaries( <dictionary_id>, <dictionary_id>, ... ) In list context, returns a list of Color::Library::Dictionary objects (for each <dictionary_id> passed in In scalar context, returns a hash of Color::Library::Dictionary objects mapping a dictionary id to a dictionary When called without arguments, the method will return all dictionaries $color = Color::Library->color( <query> ) Returns a Color::Library::Color object found via <query> A query can be any of the following: color name A color name is like "blue" or "bleached-almond" color title A color title is like "Dark Green-Teal" color id A color id is in the form of <dictionary_id>:<color_name>, for example: "x11:azure1" color( <query>, <query>, ... ) In list context, returns a list of Color::Library::Color objects corresponding to each <query> In scalar context, just returns the first <query> color( <dictionaries>, <query>, ... ) If an array reference is passed as the first argument, then this indicates that the array is a list of dictionary ids to search through (in order): # Search in the svg and x11 dictionaries for a match my $blue = Color::Library->color([qw/svg x11/], "blue"); # Will not find "aquamarine1" in the svg dictionary, so it will try the x11 dictionary my $aquamarine1 = Color::Library->color([qw/svg x11/], "aquamarine1"); $color = Color::Library->colors $color = Color::Library->colour $color = Color::Library->colours All are aliases for the above color method ABOUT
This package was inspired by Graphics::ColorNames, and covers much of the same ground. However, I found the Graphics::ColorNames interface difficult to use. I also wanted to list colors directly in the perldoc, which this package does. SEE ALSO
Graphics::ColorNames AUTHOR
Robert Krimen <robertkrimen@gmail.com> COPYRIGHT AND LICENSE
This software is copyright (c) 2011 by Robert Krimen. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.14.2 2011-12-07 Color::Library(3pm)
All times are GMT -4. The time now is 09:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy