Sponsored Content
Top Forums Shell Programming and Scripting awk word boundaries not working Post 302928494 by ahmedwaseem2000 on Friday 12th of December 2014 06:41:23 AM
Old 12-12-2014
Don Cragun, I was working with variables and wanted to check the whole words only. Do you know how to do it?


Junior - helper , That's exactly what I was struggling with.


Apart from concatenation and checking the begining and end of strings, isnt there any other way of doing this?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Word boundaries in GAWK?

I wanted to use GAWK's 'word boundary' feature but can't get it to work. Doesn't GAWK support \<word\>? Sample record: Title Bats in the fifth act of Chushingura (top); the... (6 Replies)
Discussion started by: Bubnoff
6 Replies

2. Programming

key_t type max length or boundaries value

Hello, In shared memory, when using shmget function, first parameter is ket_t key. I know it is an integer type, but length of it is system dependent. That means may not be have integer's ranges. What is range of key_t in Linux? Is it different in distros, for example in ubuntu & fedora? (2 Replies)
Discussion started by: pronetin
2 Replies

3. UNIX for Dummies Questions & Answers

grep for word not working

Hi All..I need a help i am trying to find a word using below script whereas the word exists in my file nitin.txt as a directory but still i am getting "word not found" output..Your suggestions welcomed.: #to check for existence of nitin #!/bin/bash cd /apps/uat1/deploy/app ls -lrt >... (4 Replies)
Discussion started by: nattynitin
4 Replies

4. UNIX for Advanced & Expert Users

Awk expressions working & not working

Hi, Putting across a few awk expressions. Apart from the last, all of them are working. echo a/b/c | awk -F'/b/c$' '{print $1}' a echo a/b/c++ | awk -F'/b/c++' '{print $1}' a echo a/b/c++ | awk -F'/b/c++$' '{print $1}' a/b/c++ Request thoughts on why putting a '$' post double ++... (12 Replies)
Discussion started by: vibhor_agarwali
12 Replies

5. UNIX for Dummies Questions & Answers

Find EXACT word in files, just the word: no prefix, no suffix, no 'similar', just the word

I have a file that has the words I want to find in other files (but lets say I just want to find my words in a single file). Those words are IDs, so if my word is ZZZ4, outputs like aaZZZ4, ZZZ4bb, aaZZZ4bb, ZZ4, ZZZ, ZyZ4, ZZZ4.8 (or anything like that) WON'T BE USEFUL. I need the whole word... (6 Replies)
Discussion started by: chicchan
6 Replies

6. Shell Programming and Scripting

sed working as uniq 1st word only

Hello, everyone. I am having trouble figuring out sed command which emulates uniq. The task I want to do is that 2 consecutive lines in file should be considered the same using the first word only. Example: cat tmp.txt ddd eee aaa bbb ccc ddd eee fff asd fdd asd fdd bbb aaa bbb asd fgh... (4 Replies)
Discussion started by: motorcek
4 Replies

7. Shell Programming and Scripting

awk Script: removing periodic boundaries

SOLVED, thank you! Edit2: Good news everyone, I managed to get it down to a "simple" problem, but I still have some syntax issues. Here is the code which troubles me: awk 'BEGIN{x2=0;x1=0;crit=0;} $1 < 1000000 {x2=$4; diffx=x2-x1; x1=x2; diffx > 3.6 ? {crit=1} : {crit=0};... (2 Replies)
Discussion started by: Consti
2 Replies

8. Shell Programming and Scripting

awk - why this is not working? trying next word!

Hi Experts, Can you please advise , why I am not able to make it work, or why this is not working: I spent quite a lot of time on this figuring out , but not working, file : This is a test file thanks for your reply This is another file again Have a nice day this is a small file... (3 Replies)
Discussion started by: rveri
3 Replies

9. Shell Programming and Scripting

How do i replace a word ending with "key" using awk excpet for one word?

echo {mbr_key,grp_key,dep_key,abc,xyz,aaa,ccc} | awk 'gsub(/^|abc,|$/,"") {print}' Required output {grp_key,xyz,aaa,ccc} (5 Replies)
Discussion started by: 100bees
5 Replies

10. UNIX for Beginners Questions & Answers

How to search for a word in column header that fully matches the word not partially in awk?

I have a multicolumn text file with header in the first row like this The headers are stored in an array called . which contains I want to search for each elements of this array from that multicolumn text file. And I am using this awk approach for ii in ${hdr} do gawk -vcol="$ii" -F... (1 Reply)
Discussion started by: Atta
1 Replies
Gtk2::TextTag(3)					User Contributed Perl Documentation					  Gtk2::TextTag(3)

NAME
Gtk2::TextTag HIERARCHY
Glib::Object +----Gtk2::TextTag METHODS
texttag = Gtk2::TextTag->new ($name=undef) o $name (string or undef) boolean = $tag->event ($event_object, $event, $iter) o $event_object (Glib::Object) o $event (Gtk2::Gdk::Event) o $iter (Gtk2::TextIter) integer = $tag->get_priority $tag->set_priority ($priority) o $priority (integer) PROPERTIES
'accumulative-margin' (boolean : readable / writable / private) Whether left and right margins accumulate. 'background' (string : writable / private) Background color as a string 'background-full-height' (boolean : readable / writable / private) Whether the background color fills the entire line height or only the height of the tagged characters 'background-full-height-set' (boolean : readable / writable / private) Whether this tag affects background height 'background-gdk' (Gtk2::Gdk::Color : readable / writable / private) Background color as a (possibly unallocated) GdkColor 'background-set' (boolean : readable / writable / private) Whether this tag affects the background color 'background-stipple' (Gtk2::Gdk::Pixmap : readable / writable / private) Bitmap to use as a mask when drawing the text background 'background-stipple-set' (boolean : readable / writable / private) Whether this tag affects the background stipple 'direction' (Gtk2::TextDirection : readable / writable / private) Text direction, e.g. right-to-left or left-to-right 'editable' (boolean : readable / writable / private) Whether the text can be modified by the user 'editable-set' (boolean : readable / writable / private) Whether this tag affects text editability 'family' (string : readable / writable / private) Name of the font family, e.g. Sans, Helvetica, Times, Monospace 'family-set' (boolean : readable / writable / private) Whether this tag affects the font family 'font' (string : readable / writable / private) Font description as a string, e.g. "Sans Italic 12" 'font-desc' (Pango::FontDescription : readable / writable / private) Font description as a PangoFontDescription struct 'foreground' (string : writable / private) Foreground color as a string 'foreground-gdk' (Gtk2::Gdk::Color : readable / writable / private) Foreground color as a (possibly unallocated) GdkColor 'foreground-set' (boolean : readable / writable / private) Whether this tag affects the foreground color 'foreground-stipple' (Gtk2::Gdk::Pixmap : readable / writable / private) Bitmap to use as a mask when drawing the text foreground 'foreground-stipple-set' (boolean : readable / writable / private) Whether this tag affects the foreground stipple 'indent' (integer : readable / writable / private) Amount to indent the paragraph, in pixels 'indent-set' (boolean : readable / writable / private) Whether this tag affects indentation 'invisible' (boolean : readable / writable / private) Whether this text is hidden. 'invisible-set' (boolean : readable / writable / private) Whether this tag affects text visibility 'justification' (Gtk2::Justification : readable / writable / private) Left, right, or center justification 'justification-set' (boolean : readable / writable / private) Whether this tag affects paragraph justification 'language' (string : readable / writable / private) The language this text is in, as an ISO code. Pango can use this as a hint when rendering the text. If not set, an appropriate default will be used. 'language-set' (boolean : readable / writable / private) Whether this tag affects the language the text is rendered as 'left-margin' (integer : readable / writable / private) Width of the left margin in pixels 'left-margin-set' (boolean : readable / writable / private) Whether this tag affects the left margin 'name' (string : readable / writable / construct-only / private) Name used to refer to the text tag. NULL for anonymous tags 'paragraph-background' (string : writable / private) Paragraph background color as a string 'paragraph-background-gdk' (Gtk2::Gdk::Color : readable / writable / private) Paragraph background color as a (possibly unallocated) GdkColor 'paragraph-background-set' (boolean : readable / writable / private) Whether this tag affects the paragraph background color 'pixels-above-lines' (integer : readable / writable / private) Pixels of blank space above paragraphs 'pixels-above-lines-set' (boolean : readable / writable / private) Whether this tag affects the number of pixels above lines 'pixels-below-lines' (integer : readable / writable / private) Pixels of blank space below paragraphs 'pixels-below-lines-set' (boolean : readable / writable / private) Whether this tag affects the number of pixels above lines 'pixels-inside-wrap' (integer : readable / writable / private) Pixels of blank space between wrapped lines in a paragraph 'pixels-inside-wrap-set' (boolean : readable / writable / private) Whether this tag affects the number of pixels between wrapped lines 'right-margin' (integer : readable / writable / private) Width of the right margin in pixels 'right-margin-set' (boolean : readable / writable / private) Whether this tag affects the right margin 'rise' (integer : readable / writable / private) Offset of text above the baseline (below the baseline if rise is negative) in Pango units 'rise-set' (boolean : readable / writable / private) Whether this tag affects the rise 'scale' (double : readable / writable / private) Font size as a scale factor relative to the default font size. This properly adapts to theme changes etc. so is recommended. Pango predefines some scales such as PANGO_SCALE_X_LARGE 'scale-set' (boolean : readable / writable / private) Whether this tag scales the font size by a factor 'size' (integer : readable / writable / private) Font size in Pango units 'size-points' (double : readable / writable / private) Font size in points 'size-set' (boolean : readable / writable / private) Whether this tag affects the font size 'stretch' (Pango::Stretch : readable / writable / private) Font stretch as a PangoStretch, e.g. PANGO_STRETCH_CONDENSED 'stretch-set' (boolean : readable / writable / private) Whether this tag affects the font stretch 'strikethrough' (boolean : readable / writable / private) Whether to strike through the text 'strikethrough-set' (boolean : readable / writable / private) Whether this tag affects strikethrough 'style' (Pango::Style : readable / writable / private) Font style as a PangoStyle, e.g. PANGO_STYLE_ITALIC 'style-set' (boolean : readable / writable / private) Whether this tag affects the font style 'tabs' (Pango::TabArray : readable / writable / private) Custom tabs for this text 'tabs-set' (boolean : readable / writable / private) Whether this tag affects tabs 'underline' (Pango::Underline : readable / writable / private) Style of underline for this text 'underline-set' (boolean : readable / writable / private) Whether this tag affects underlining 'variant' (Pango::Variant : readable / writable / private) Font variant as a PangoVariant, e.g. PANGO_VARIANT_SMALL_CAPS 'variant-set' (boolean : readable / writable / private) Whether this tag affects the font variant 'weight' (integer : readable / writable / private) Font weight as an integer, see predefined values in PangoWeight; for example, PANGO_WEIGHT_BOLD 'weight-set' (boolean : readable / writable / private) Whether this tag affects the font weight 'wrap-mode' (Gtk2::WrapMode : readable / writable / private) Whether to wrap lines never, at word boundaries, or at character boundaries 'wrap-mode-set' (boolean : readable / writable / private) Whether this tag affects line wrap mode SIGNALS
boolean = event (Gtk2::TextTag, Glib::Object, Gtk2::Gdk::Event, Gtk2::TextIter) ENUMS AND FLAGS
enum Gtk2::Justification o 'left' / 'GTK_JUSTIFY_LEFT' o 'right' / 'GTK_JUSTIFY_RIGHT' o 'center' / 'GTK_JUSTIFY_CENTER' o 'fill' / 'GTK_JUSTIFY_FILL' enum Gtk2::TextDirection o 'none' / 'GTK_TEXT_DIR_NONE' o 'ltr' / 'GTK_TEXT_DIR_LTR' o 'rtl' / 'GTK_TEXT_DIR_RTL' enum Gtk2::WrapMode o 'none' / 'GTK_WRAP_NONE' o 'char' / 'GTK_WRAP_CHAR' o 'word' / 'GTK_WRAP_WORD' o 'word-char' / 'GTK_WRAP_WORD_CHAR' 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::Underline o 'none' / 'PANGO_UNDERLINE_NONE' o 'single' / 'PANGO_UNDERLINE_SINGLE' o 'double' / 'PANGO_UNDERLINE_DOUBLE' o 'low' / 'PANGO_UNDERLINE_LOW' o 'error' / 'PANGO_UNDERLINE_ERROR' enum Pango::Variant o 'normal' / 'PANGO_VARIANT_NORMAL' o 'small-caps' / 'PANGO_VARIANT_SMALL_CAPS' SEE ALSO
Gtk2, Glib::Object COPYRIGHT
Copyright (C) 2003-2008 by the gtk2-perl team. This software is licensed under the LGPL. See Gtk2 for a full notice. perl v5.12.1 2010-07-05 Gtk2::TextTag(3)
All times are GMT -4. The time now is 02:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy