Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Help with pattern match and Extract Post 303025901 by arunkumar_mca on Wednesday 14th of November 2018 10:48:01 PM
Old 11-14-2018
I am using Redhat Linux. In my example I have SB alone so it should be CONC- BC. Things I have tried

cut -d' ' -f1,2,3 test.desc - where test.desc is my file. This will bring me from 2nd segment but I have to get by SB or B
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Match first pattern first then extract second pattern match

My input file: <accession>Q91G55</accession> <name>043L_IIV6</name> <protein> <recommendedName> <location> <position position="294"/> </location> <fullName>Uncharacterized protein 043L</fullName> <accession>P18556</accession> <name>1106L_ASFB7</name> <protein> <recommendedName>... (5 Replies)
Discussion started by: patrick87
5 Replies

2. Shell Programming and Scripting

Extract data from records that match pattern

Hi Guys, I have a file as follows: a b c 1 2 3 4 pp gg gh hh 1 2 fm 3 4 g h i j k l m 1 2 3 4 d e f g h j i k l 1 2 3 f 3 4 r t y u i o p d p re 1 2 3 f 4 t y w e q w r a s p a 1 2 3 4 I am trying to extract all the 2's from each row. 2 is just an example... (6 Replies)
Discussion started by: npatwardhan
6 Replies

3. Shell Programming and Scripting

Need one liner to search pattern and print everything expect 6 lines from where pattern match made

i need to search for a pattern from a big file and print everything expect the next 6 lines from where the pattern match was made. (8 Replies)
Discussion started by: chidori
8 Replies

4. Shell Programming and Scripting

Search for a pattern,extract value(s) from next line, extract lines having those extracted value(s)

I have hundreds of files to process. In each file I need to look for a pattern then extract value(s) from next line and then search for value(s) selected from point (2) in the same file at a specific position. HEADER ELECTRON TRANSPORT 18-MAR-98 1A7V TITLE CYTOCHROME... (7 Replies)
Discussion started by: AshwaniSharma09
7 Replies

5. Shell Programming and Scripting

Pattern Match & Extract from a string

Hi, I have long string in 2nd field, as shown below: REF1 | CLESCLJSCSHSCSMSCSNSCSRSCUDSCUFSCU7SCV1SCWPSCXGPDBACAPA0DHDPDMESED6 REF2 | SBR4PCBFPCDRSCSCG3SCHEBSCKNSCKPSCLLSCMCZXTNPCVFPCV6P4KL0DMDSDSASEWG I have a group of fixed patterns which can occur in these long strings & only... (11 Replies)
Discussion started by: karumudi7
11 Replies

6. UNIX for Dummies Questions & Answers

Match Pattern after certain pattern and Print words next to Pattern

Hi experts , im new to Unix,AWK ,and im just not able to get this right. I need to match for some patterns if it matches I need to print the next few words to it.. I have only three such conditions to match… But I need to print only those words that comes after satisfying the first condition..... (2 Replies)
Discussion started by: 100bees
2 Replies

7. Shell Programming and Scripting

sed : match one pattern then the next consecutive second pattern not working

Ive used this snippet of code on a solaris box thousands of times. But it isnt working on the new linux box sed -n '/interface LoopBack0/{N;/ ip address /p;}' *.conf its driving me nuts !! Is there something Im missing ? (7 Replies)
Discussion started by: popeye
7 Replies

8. Shell Programming and Scripting

Extract lines that match a pattern

Hi all, I got a file that contains the following content, Actually it is a part of the file content, Installing XYZ XYZA Image, API 18, revision 2 Unzipping XYZ XYZA Image, API 18, revision 2 (1%) Unzipping XYZ XYZA Image, API 18, revision 2 (96%) Unzipping XYZ XYZA Image, API 18,... (7 Replies)
Discussion started by: Kashyap
7 Replies

9. Shell Programming and Scripting

Rearrange or replace only the second line after pattern match or pattern match

Im using the command below , but thats not the output that i want. it only prints the odd and even numbers. awk '{if(NR%2){print $0 > "1"}else{print $0 > "2"}}' Im hoping for something like this file1: Text hi this is just a test text1 text2 text3 text4 text5 text6 Text hi... (2 Replies)
Discussion started by: invinzin21
2 Replies

10. Shell Programming and Scripting

Match Pattern and print pattern and multiple lines into one line

Hello Experts , require help . See below output: File inputs ------------------------------------------ Server Host = mike id rl images allocated last updated density vimages expiration last read <------- STATUS ------->... (4 Replies)
Discussion started by: tigerhills
4 Replies
Pango::FontDescription(3pm)				User Contributed Perl Documentation			       Pango::FontDescription(3pm)

NAME
Pango::FontDescription - Pango object to represent a description of a font HIERARCHY
Glib::Boxed +----Pango::FontDescription METHODS
fontdescription = Pango::FontDescription->new $desc->set_absolute_size ($size) o $size (double) Since: pango 1.8 boolean = $desc->better_match ($old_match, $new_match) o $old_match (Pango::FontDescription or undef) o $new_match (Pango::FontDescription) boolean = $desc1->equal ($desc2) o $desc2 (Pango::FontDescription) string = $desc->get_family $desc->set_family ($family) o $family (string) $desc->set_family_static ($family) o $family (string) fontdescription = Pango::FontDescription->from_string ($str) o $str (string) gravity = $desc->get_gravity Since: pango 1.16 $desc->set_gravity ($gravity) o $gravity (Pango::Gravity) Since: pango 1.16 integer = $desc->hash $desc->merge ($desc_to_merge, $replace_existing) o $desc_to_merge (Pango::FontDescription) o $replace_existing (boolean) $desc->merge_static ($desc_to_merge, $replace_existing) o $desc_to_merge (Pango::FontDescription) o $replace_existing (boolean) fontmask = $desc->get_set_fields integer = $desc->get_size boolean = $desc->get_size_is_absolute Since: pango 1.8 $desc->set_size ($size) o $size (integer) stretch = $desc->get_stretch $desc->set_stretch ($stretch) o $stretch (Pango::Stretch) style = $desc->get_style $desc->set_style ($style) o $style (Pango::Style) string = $desc->to_filename string = $desc->to_string $desc->unset_fields ($to_unset) o $to_unset (Pango::FontMask) variant = $desc->get_variant $desc->set_variant ($variant) o $variant (Pango::Variant) weight = $desc->get_weight $desc->set_weight ($weight) o $weight (Pango::Weight) ENUMS AND FLAGS
flags Pango::FontMask o 'family' / 'PANGO_FONT_MASK_FAMILY' o 'style' / 'PANGO_FONT_MASK_STYLE' o 'variant' / 'PANGO_FONT_MASK_VARIANT' o 'weight' / 'PANGO_FONT_MASK_WEIGHT' o 'stretch' / 'PANGO_FONT_MASK_STRETCH' o 'size' / 'PANGO_FONT_MASK_SIZE' o 'gravity' / 'PANGO_FONT_MASK_GRAVITY' enum Pango::Gravity o 'south' / 'PANGO_GRAVITY_SOUTH' o 'east' / 'PANGO_GRAVITY_EAST' o 'north' / 'PANGO_GRAVITY_NORTH' o 'west' / 'PANGO_GRAVITY_WEST' o 'auto' / 'PANGO_GRAVITY_AUTO' enum Pango::Stretch o 'ultra-condensed' / 'PANGO_STRETCH_ULTRA_CONDENSED' o 'extra-condensed' / 'PANGO_STRETCH_EXTRA_CONDENSED' o 'condensed' / 'PANGO_STRETCH_CONDENSED' o 'semi-condensed' / 'PANGO_STRETCH_SEMI_CONDENSED' o 'normal' / 'PANGO_STRETCH_NORMAL' o 'semi-expanded' / 'PANGO_STRETCH_SEMI_EXPANDED' o 'expanded' / 'PANGO_STRETCH_EXPANDED' o 'extra-expanded' / 'PANGO_STRETCH_EXTRA_EXPANDED' o 'ultra-expanded' / 'PANGO_STRETCH_ULTRA_EXPANDED' enum Pango::Style o 'normal' / 'PANGO_STYLE_NORMAL' o 'oblique' / 'PANGO_STYLE_OBLIQUE' o 'italic' / 'PANGO_STYLE_ITALIC' enum Pango::Variant o 'normal' / 'PANGO_VARIANT_NORMAL' o 'small-caps' / 'PANGO_VARIANT_SMALL_CAPS' enum Pango::Weight o 'thin' / 'PANGO_WEIGHT_THIN' o 'ultralight' / 'PANGO_WEIGHT_ULTRALIGHT' o 'light' / 'PANGO_WEIGHT_LIGHT' o 'book' / 'PANGO_WEIGHT_BOOK' o 'normal' / 'PANGO_WEIGHT_NORMAL' o 'medium' / 'PANGO_WEIGHT_MEDIUM' o 'semibold' / 'PANGO_WEIGHT_SEMIBOLD' o 'bold' / 'PANGO_WEIGHT_BOLD' o 'ultrabold' / 'PANGO_WEIGHT_ULTRABOLD' o 'heavy' / 'PANGO_WEIGHT_HEAVY' o 'ultraheavy' / 'PANGO_WEIGHT_ULTRAHEAVY' SEE ALSO
Pango, Glib::Boxed COPYRIGHT
Copyright (C) 2003-2011 by the gtk2-perl team. This software is licensed under the LGPL. See Pango for a full notice. perl v5.14.2 2011-11-15 Pango::FontDescription(3pm)
All times are GMT -4. The time now is 06:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy