Search/replace using visual block


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Search/replace using visual block
# 1  
Old 12-21-2006
Search/replace using visual block

Hi, how would we replace a few patterns on the same line with a change of it's own..using visual block on vim editor.

ie a file contains lines such as the following:

abccss (dfrss)) emailkk
abdcss (dfrss)) dmailkk

Using visual block once, replacement is indeed to get the following output:

abccss email(id)
abdcss dmail(id)

This is an example request for 2 changes in a line, how shall we replace more if needed to..

Thanks in advance.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Nested search in a file and replace the inner search

Hi Team, I am new to unix, please help me in this. I have a file named properties. The content of the file is : ##Mobile props east.url=https://qa.east.corp.com/prop/end west.url=https://qa.west.corp.com/prop/end south.url=https://qa.south.corp.com/prop/end... (2 Replies)
Discussion started by: tolearn
2 Replies

2. Shell Programming and Scripting

Search and replace value

I have a Parameter.txt file with set of parameters which i need to replace $$ControlM_Job_Name value with respective to job which i need to run.currently $$ControlM_Job_Name have PRDDWG-HLBIDW-INTREPID-SPS value i want to replce with HLBIDW-INTREPID value.is there any command which can achive this.... (1 Reply)
Discussion started by: katakamvivek
1 Replies

3. UNIX for Dummies Questions & Answers

Help with search and replace

Hi, I am using vi. I need help with search and replace. I have a file close to 100 lines. I want to search /var and replace with rm /var. /var/sadm/pkg/SUNWcsu/save/125378-03/undo.Z /var/sadm/pkg/SUNWcsr/save/pspool/SUNWcsr/save/127718-02/undo.Z... (4 Replies)
Discussion started by: samnyc
4 Replies

4. UNIX for Dummies Questions & Answers

Help with search and replace or search only of / in vi

Hi all, I am editing a config file in vi that has a / on it. At the moment, search and replace looks alright as am able to use a # as a temporary separator, i.e. :,$s#/u01/app#/u02/app#g For doing a search, I have to escape the / do. So if I want to search for /u01/app, I am having to do... (2 Replies)
Discussion started by: newbie_01
2 Replies

5. Shell Programming and Scripting

Search and Replace

hi all, I have an xml and which has a section <!ENTITY commonssf1lymphoma SYSTEM "commons/commonssf1lymphoma.xml"> <!ENTITY commonssf2lymphoma SYSTEM "commons/commonssf2lymphoma.xml"> <!ENTITY commonssf3lymphoma SYSTEM "commons/commonssf3lymphoma.xml"> i want to replace... (9 Replies)
Discussion started by: r_t_1601
9 Replies

6. Shell Programming and Scripting

perl search and replace - search in first line and replance in 2nd line

Dear All, i want to search particular string and want to replance next line value. following is the test file. search string is tmp,??? ,10:1 "???" may contain any 3 character it should remain the same and next line replace with ,10:50 tmp,123 --- if match tmp,??? then... (3 Replies)
Discussion started by: arvindng
3 Replies

7. Shell Programming and Scripting

awk: How to search for a block within a block ?

Ok, I have some experience with awk, but I haven't touched it for years ... back again and I have one problem. I have large char file, it has hundreds of major text blocks. First, I need to grab and process those, and ignore everything else. That bit is simple. Within those major text... (5 Replies)
Discussion started by: DerekAsirvadem
5 Replies

8. Shell Programming and Scripting

awk - replace number of string length from search and replace for a serialized array

Hello, I really would appreciate some help with a bash script for some string manipulation on an SQL dump: I'd like to be able to rename "sites/WHATEVER/files" to "sites/SOMETHINGELSE/files" within the sql dump. This is quite easy with sed: sed -e... (1 Reply)
Discussion started by: otrotipo
1 Replies

9. Shell Programming and Scripting

Search n replace...

Hi, Can anyone help me with the command to do the following search and replace 209560100000003-000002590688F402 0020031028210 209560100000003-000002590688W302 0040031028210 search and replace anything that has "F4” in column 30 with ‘W3’ and copy line into new file if the... (3 Replies)
Discussion started by: kate katherine
3 Replies

10. Shell Programming and Scripting

Perl: Search for string on line then search and replace text

Hi All, I have a file that I need to be able to find a pattern match on a line, search that line for a text pattern, and replace that text. An example of 4 lines in my file is: 1. MatchText_randomNumberOfText moreData ReplaceMe moreData 2. MatchText_randomNumberOfText moreData moreData... (4 Replies)
Discussion started by: Crypto
4 Replies
Login or Register to Ask a Question
Gtk2::Gdk::Visual(3pm)					User Contributed Perl Documentation				    Gtk2::Gdk::Visual(3pm)

NAME
Gtk2::Gdk::Visual - wrapper for GdkVisual HIERARCHY
Glib::Object +----Gtk2::Gdk::Visual METHODS
integer = Gtk2::Gdk::Visual->get_best_depth visual = Gtk2::Gdk::Visual->get_best visualtype = Gtk2::Gdk::Visual->get_best_type visual or undef = Gtk2::Gdk::Visual->get_best_with_both ($depth, $visual_type) o $depth (integer) o $visual_type (Gtk2::Gdk::VisualType) visual or undef = Gtk2::Gdk::Visual->get_best_with_depth ($depth) o $depth (integer) visual or undef = Gtk2::Gdk::Visual->get_best_with_type ($visual_type) o $visual_type (Gtk2::Gdk::VisualType) integer = $visual->bits_per_rgb integer = $visual->get_bits_per_rgb Since: gtk+ 2.22 unsigned = $visual->blue_mask (mask, shift, precision) = $visual->get_blue_pixel_details Since: gtk+ 2.22 integer = $visual->blue_prec integer = $visual->blue_shift byteorder = $visual->byte_order byteorder = $visual->get_byte_order Since: gtk+ 2.22 integer = $visual->colormap_size integer = $visual->get_colormap_size Since: gtk+ 2.22 integer = $visual->depth integer = $visual->get_depth Since: gtk+ 2.22 unsigned = $visual->green_mask (mask, shift, precision) = $visual->get_green_pixel_details Since: gtk+ 2.22 integer = $visual->green_prec integer = $visual->green_shift unsigned = $visual->red_mask (mask, shift, precision) = $visual->get_red_pixel_details Since: gtk+ 2.22 integer = $visual->red_prec integer = $visual->red_shift screen = $visual->get_screen Since: gtk+ 2.2 visual = Gtk2::Gdk::Visual->get_system visualtype = $visual->type visualtype = $visual->get_visual_type Since: gtk+ 2.22 ENUMS AND FLAGS
enum Gtk2::Gdk::ByteOrder o 'lsb-first' / 'GDK_LSB_FIRST' o 'msb-first' / 'GDK_MSB_FIRST' enum Gtk2::Gdk::VisualType o 'static-gray' / 'GDK_VISUAL_STATIC_GRAY' o 'grayscale' / 'GDK_VISUAL_GRAYSCALE' o 'static-color' / 'GDK_VISUAL_STATIC_COLOR' o 'pseudo-color' / 'GDK_VISUAL_PSEUDO_COLOR' o 'true-color' / 'GDK_VISUAL_TRUE_COLOR' o 'direct-color' / 'GDK_VISUAL_DIRECT_COLOR' SEE ALSO
Gtk2, Glib::Object 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::Gdk::Visual(3pm)