Sponsored Content
Top Forums Shell Programming and Scripting Search for multiple strings in specific position Post 302298707 by HugoH on Wednesday 18th of March 2009 11:13:45 AM
Old 03-18-2009
Search for multiple strings in specific position

Hi,

I need to search for some strings in specific positions in a file.

If the strings: "foo1", "foo2" or "foo3" is on position 266 or position 288 in a file i want the whole line printed.


Any idea how to do it?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Print lines with search string at specific position

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. UNIX for Dummies Questions & Answers

Search for multiple strings and mail accordingly

Hi, I need to find if there is any error in the last few lines of the log file and send a mail accordingly.For example, Following errors can be logged in the log file. ERR_1="DB Connection not established" ERR_2="Server Unloading" I need to find if these errors are found in the log file and... (3 Replies)
Discussion started by: AnneAnne
3 Replies

3. Shell Programming and Scripting

search a line and insert string into specific at position

Hi, guys. I have one question: How can I search for a line with certain string in it and then insert a string into this line? For example: There is a file called shadow, the contents of it are below: ************************** ... yuanz:VIRADxMsadfDF/Q:0:0:50:7:::... (9 Replies)
Discussion started by: daikeyang
9 Replies

4. Shell Programming and Scripting

Search in specific position and print the whole line

I have two files abc.dat and sant.dat (Big file 60k rows) for every line's 1,4 of abc.dat need to seach if this is present on 28,4 of sant.dat every line. if its present the output needs to go to bde.dat Example: contents abc.dat aaaa bbbb cccc dddd contents sant.dat this is... (4 Replies)
Discussion started by: ssantoshss
4 Replies

5. Shell Programming and Scripting

Search multiple Strings in a File

Hi I want to search multiple strings in a file . But the search should start with "From" Keyword and end with before "Where" keyword. Please suggest me. Thanks (2 Replies)
Discussion started by: sboss
2 Replies

6. Shell Programming and Scripting

Find position of character in multiple strings in a file

Greetings. I have a file with information like this: AMNDHRKEOEU?AMNDHRKEOEU?AMNDHRKEOEU?AMNDHRKEOEU? AMNDHRKEEU?AMNDHREOEU? AMNDHREU?AHRKEOEU?AMNDHRKEU?AMNDKEOEU? What I need to extract is the position, in every line, of every occurrence of '?' A desired output would be something... (6 Replies)
Discussion started by: Twinklefingers
6 Replies

7. Shell Programming and Scripting

Search & Replace: Multiple Strings / Multiple Files

I have a list of files all over a file system e.g. /home/1/foo/bar.x /www/sites/moose/foo.txtI'm looking for strings in these files and want to replace each occurrence with a replacement string, e.g. if I find: '#@!^\&@ in any of the files I want to replace it with: 655#@11, etc. There... (2 Replies)
Discussion started by: spacegoose
2 Replies

8. Shell Programming and Scripting

Whether we can search multiple strings using or in grep -F

Hi, Whether we can search multiple strings using or in grep -F In Generally, grep -F "string1" "filename.txt" How to search for multiple string using grep -F as we using grep grep "string1\|string2" "filename.txt" Regards, Nanthagopal A (10 Replies)
Discussion started by: nanthagopal
10 Replies

9. Post Here to Contact Site Administrators and Moderators

Search for a pattern and replace a space at specific position with a Character in File

In file, we have millions of records each of 1000 in length. And at specific position say 800 there is a space, we need to replace it with Character X if the ID in that row starts with 123. So far i have used the below which is replacing space at that position to X but its not checking for... (3 Replies)
Discussion started by: Jagmeet Singh
3 Replies

10. 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
Gtk2::RadioButton(3pm)					User Contributed Perl Documentation				    Gtk2::RadioButton(3pm)

NAME
Gtk2::RadioButton - wrapper for GtkRadioButton SYNOPSIS
# first group $foo1 = Gtk2::RadioButton->new (undef, 'Foo One'); $foo2 = Gtk2::RadioButton->new ($foo1, 'Foo Two'); $foo3 = Gtk2::RadioButton->new ($foo2, 'Foo Three'); # second group, using the group reference $bar1 = Gtk2::RadioButton->new (undef, 'Bar One'); $group = $bar1->get_group; $bar2 = Gtk2::RadioButton->new ($group, 'Bar Two'); $bar3 = Gtk2::RadioButton->new ($group, 'Bar Three'); # move bar3 from the bar group to the foo group. $bar->set_group ($foo->get_group); # iterate over the widgets in the group $group = $foo1->get_group; foreach my $r (@$group) { $r->set_sensitive ($whatever); } DESCRIPTION
A single radio button performs the same basic function as a Gtk2::CheckButton, as its position in the object hierarchy reflects. It is only when multiple radio buttons are grouped together that they become a different user interface component in their own right. Every radio button is a member of some group of radio buttons. When one is selected, all other radio buttons in the same group are deselected. A Gtk2::RadioButton is one way of giving the user a choice from many options; Gtk2::OptionMenu and Gtk2::ComboBox (added in gtk+ 2.4) are alternatives. Each constructor can take either a group or widget from that group where the group is wanted; this is an enhancement over the C API. Nevertheless, the _from_widget forms are provided for completeness. HIERARCHY
Glib::Object +----Glib::InitiallyUnowned +----Gtk2::Object +----Gtk2::Widget +----Gtk2::Container +----Gtk2::Bin +----Gtk2::Button +----Gtk2::ToggleButton +----Gtk2::CheckButton +----Gtk2::RadioButton INTERFACES
Glib::Object::_Unregistered::AtkImplementorIface Gtk2::Buildable Gtk2::Activatable METHODS
widget = Gtk2::RadioButton->new ($member_or_listref=undef, $label=undef) o $member_or_listref (scalar) reference to radiobutton group or a Gtk2::RadioButton belonging to that group. o $label (string) Create a radio button. If $label is provided, it will be interpreted as a mnemonic. If $member_or_listref is undef, the radio button will be created in a new group. widget = Gtk2::RadioButton->new_from_widget ($group, $label=undef) o $group (Gtk2::RadioButton or undef) o $label (string) widget = Gtk2::RadioButton->new_with_label ($member_or_listref=undef, $label=undef) o $member_or_listref (scalar) reference to radiobutton group or a Gtk2::RadioButton belonging to that group. o $label (string) Create a radio button with a plain text label, which will not be interpreted as a mnemonic. widget = Gtk2::RadioButton->new_with_label_from_widget ($group, $label=undef) o $group (Gtk2::RadioButton or undef) o $label (string) widget = Gtk2::RadioButton->new_with_mnemonic ($member_or_listref=undef, $label=undef) o $member_or_listref (scalar) reference to radiobutton group or a Gtk2::RadioButton belonging to that group. o $label (string) Create a radio button with a mnemonic; this is an alias for "new". widget = Gtk2::RadioButton->new_with_mnemonic_from_widget ($group, $label=undef) o $group (Gtk2::RadioButton or undef) o $label (string) arrayref = $radio_button->get_group Return a reference to the radio group to which $radio_button belongs. The group is a reference to an array of widget references; the array is not magical, that is, it will not be updated automatically if the group changes; call "get_group" each time you want to use the group. $radio_button->set_group ($member_or_listref) o $member_or_listref (scalar) reference to the group or a Gtk2::RadioButton belonging to that group. Assign $radio_button to a new group. PROPERTIES
'group' (Gtk2::RadioButton : default undef : writable / private) The radio button whose group this widget belongs to. SIGNALS
group-changed (Gtk2::RadioButton) SEE ALSO
Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget, Gtk2::Container, Gtk2::Bin, Gtk2::Button, Gtk2::ToggleButton, Gtk2::CheckButton COPYRIGHT
Copyright (C) 2003-2011 by the gtk2-perl team. This software is licensed under the LGPL. See Gtk2 for a full notice. perl v5.14.2 2012-05-27 Gtk2::RadioButton(3pm)
All times are GMT -4. The time now is 02:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy