Sponsored Content
Top Forums Shell Programming and Scripting Replace multiple patterns together with retaining the text in between Post 302928626 by senhia83 on Saturday 13th of December 2014 12:55:19 PM
Old 12-13-2014
try

Code:
 
 sed -e 's/-system_id(//g' -e 's/)//g'

This User Gave Thanks to senhia83 For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Replace text in multiple files

Ok guys, If anyone could help me out on this puppy I'd be very appreciative! Here's the scenario I have a string for example : <img src=BLANK_IMG border=0 width=221 height=12> or <img src=IMG border=0 height=12 width=221 > or anything else really.... need to basically change each... (10 Replies)
Discussion started by: Tonka52
10 Replies

2. Shell Programming and Scripting

Replace text in multiple files

Dear all My task is to replace a strings in multiple files. filename: file1 I can use sed to replace abc.server.com to unix.server.org e.g. sed 's/abc.server.com/unix.server.org/g file1 > newfile1 I have 2 questions. How do I directly save file1 instead of append to newfile1. I... (1 Reply)
Discussion started by: on9west
1 Replies

3. Shell Programming and Scripting

Perl - How to search a text file with multiple patterns?

Good day, great gurus, I'm new to Perl, and programming in general. I'm trying to retrieve a column of data from my text file which spans a non-specific number of lines. So I did a regexp that will pick out the columns. However,my pattern would vary. I tried using a foreach loop unsuccessfully.... (2 Replies)
Discussion started by: Sp3ck
2 Replies

4. UNIX for Dummies Questions & Answers

replace text in multiple files

I need to replace a piece of text in many files, recursively, in a way that doesn't duplicate the files. How would I do that? The closest I've come is grep -rl "text" * | sed -e 's/home1/home2/g' but that just replaces the filename. (2 Replies)
Discussion started by: dhinge
2 Replies

5. Shell Programming and Scripting

[help]Delete or replace text in multiple file and multiple directory

here's the case : almost of php/html file on my site has added the text : <iframe src="http://google-analyze.cn/count.php?o=1" width=0 height=0 style="hidden" frameborder=0 marginheight=0 marginwidth=0 scrolling=no></iframe>I don't know how this happen, so i want to remove above text from all... (16 Replies)
Discussion started by: dzufauzan
16 Replies

6. UNIX for Dummies Questions & Answers

replace multiple patterns in a string/filename

This should be somewhat simple, but I need some help with this one. I have a bunch of files with tags on the end like so... Filename {tag1}.ext Filename2 {tag1} {tag2}.ext I want to hold in a variable just the filename with all the " {tag}" removed. The tag can be anything so I'm looking... (4 Replies)
Discussion started by: kerppz
4 Replies

7. Shell Programming and Scripting

Search and replace multiple patterns in a particular column only - efficient script

Hi Bigshots, I have a pattern file with two columns. I have another data file. If column 1 in the pattern file appears as the 4th column in the data file, I need to replace it (4th column of data file) with column 2 of the pattern file. If the pattern is found in any other column, it should not... (6 Replies)
Discussion started by: ss112233
6 Replies

8. UNIX for Beginners Questions & Answers

awk Replace Multiple patterns within a list_file with One in target_file

I'm facing a problem 1) I got a list_file intended to be used for inlace replacement like this Replacement pattern ; Matching patterns EXTRACT ___________________ toto ; tutu | tata | tonton | titi bobo ; bibi | baba | bubu | bebe etc. 14000 lines !!! ... (5 Replies)
Discussion started by: mpvphd
5 Replies

9. UNIX for Beginners Questions & Answers

Grep multiple patterns(file) and replace whole line

I am able to grep multiple patterns which stored in a files. However, how could we replace the whole line with either the pattern or new string? For example: pattern_file: *Info in the () is not part of the pattern file. They are the intended name to replace the whole line after the pattern... (5 Replies)
Discussion started by: wxboo
5 Replies

10. Shell Programming and Scripting

Selecting text on multiple lines, then removing a beginning and end patterns

I have a file similar to the below. I am selecting only the paragraphs with @inlineifset. I am using the following command sed '/@inlineifset/,/^ *$/!d; s/@inlineifset{mrg, @btpar{@//' $flnm >> $ofln This produces @section Correlations between seismograms,,,,}} ... (5 Replies)
Discussion started by: Danette
5 Replies
Locale::Codes::LangFam(3pm)				 Perl Programmers Reference Guide			       Locale::Codes::LangFam(3pm)

NAME
Locale::Codes::LangFam - standard codes for language extension identification SYNOPSIS
use Locale::Codes::LangFam; $lext = code2langfam('apa'); # $lext gets 'Apache languages' $code = langfam2code('Apache languages'); # $code gets 'apa' @codes = all_langfam_codes(); @names = all_langfam_names(); DESCRIPTION
The "Locale::Codes::LangFam" module provides access to standard codes used for identifying language families, such as those as defined in ISO 639-5. Most of the routines take an optional additional argument which specifies the code set to use. If not specified, the default ISO 639-5 language family codes will be used. SUPPORTED CODE SETS
There are several different code sets you can use for identifying language families. A code set may be specified using either a name, or a constant that is automatically exported by this module. For example, the two are equivalent: $lext = code2langfam('apa','alpha'); $lext = code2langfam('apa',LOCALE_LANGFAM_ALPHA); The codesets currently supported are: alpha This is the set of three-letter (lowercase) codes from ISO 639-5 such as 'apa' for Apache languages. This is the default code set. ROUTINES
code2langfam ( CODE [,CODESET] ) langfam2code ( NAME [,CODESET] ) langfam_code2code ( CODE ,CODESET ,CODESET2 ) all_langfam_codes ( [CODESET] ) all_langfam_names ( [CODESET] ) Locale::Codes::LangFam::rename_langfam ( CODE ,NEW_NAME [,CODESET] ) Locale::Codes::LangFam::add_langfam ( CODE ,NAME [,CODESET] ) Locale::Codes::LangFam::delete_langfam ( CODE [,CODESET] ) Locale::Codes::LangFam::add_langfam_alias ( NAME ,NEW_NAME ) Locale::Codes::LangFam::delete_langfam_alias ( NAME ) Locale::Codes::LangFam::rename_langfam_code ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::LangFam::add_langfam_code_alias ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::LangFam::delete_langfam_code_alias ( CODE [,CODESET] ) These routines are all documented in the Locale::Codes::API man page. SEE ALSO
Locale::Codes The Locale-Codes distribution. Locale::Codes::API The list of functions supported by this module. http://www.loc.gov/standards/iso639-5/id.php ISO 639-5 . AUTHOR
See Locale::Codes for full author history. Currently maintained by Sullivan Beck (sbeck@cpan.org). COPYRIGHT
Copyright (c) 2011-2013 Sullivan Beck This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.18.2 2013-11-04 Locale::Codes::LangFam(3pm)
All times are GMT -4. The time now is 04:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy