Replace aword in a.The replaced word should not be overwitten in perl(details inside)


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Replace aword in a.The replaced word should not be overwitten in perl(details inside)
# 8  
Old 02-21-2009
I got lucky.... you're welcome.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help with compare 2 column content and corrected/replaced word

Input File CGGCGCCTCGCNNNCGAGCG CGGCGCGCCGAATCCGTGCG TCGCNGC GCGCCGC ACGGCNNNNN ACGGCCTCGCG CGGCNGCCCGCCC CGGCGCGCCGTCC Desired Output File CGGCGCCTCGCNNNCGAGCG CGGCGCGCCGAATCCGTGCG CGGCGCCTCGCATCCGAGCG TCGCNGC GCGCCGC TCGCCGC ACGGCNNNNN ACGGCCTCGCG ACGGCTCGCG... (6 Replies)
Discussion started by: perl_beginner
6 Replies

2. UNIX for Beginners Questions & Answers

Replace exact word by perl

my inputfile: This is a test and only a test for production - prod. echo "This is a test and only a test for production - prod" | perl -pi -e 's/prod/test/g' outputfile: This is a test and only a test for testuction - test I only want to replace prod, not production. I also... (3 Replies)
Discussion started by: loktamann
3 Replies

3. UNIX for Advanced & Expert Users

Perl command to replace word in file...

Hi, I want to search for a specific word in file and replace whole line with new text. e.g. 1) I have file with below lines APP=ABCD 12/12/2012 DB=DDB 01/01/2013 I need perl command which will check for APP=$VAL and replace whole line with APP=$NEWVAL $NEWDT Simlarly need a... (2 Replies)
Discussion started by: mgpatil31
2 Replies

4. Red Hat

Need to mount LUN on two linux boxs (one rw the other ro) caveat details inside

Calling all Linux GURU's. The purpose of this thread is to try an recreate what we already have stood up in my environment, however the steps i am having to produce my own. I have got multiple applications that dump the data to various LUNs, the LUNs are managed by an Enterprise SAN... (11 Replies)
Discussion started by: jcejka
11 Replies

5. Shell Programming and Scripting

Find and replace a word in all the files (that contain the word) under a directory

Hi Everyone, I am looking for a simple way for replacing all the files under a directory that use the server "xsgd1234dap" with "xsdr3423pap". For Example: In the Directory, $pwd /home/nick $ grep -l "xsgd1234dap" *.sh | wc -l 119 I have "119" files that are still using... (5 Replies)
Discussion started by: filter
5 Replies

6. Shell Programming and Scripting

Replace a word in a string starting with another word

Hi All, I have a file in which a number of lines are starting with similar first word but different next words. I want to replace the any nth word(not 1st or 2nd) with another word. Eg:- My file contains are like this:- Ram is a boy. Ram is a good boy. Ram plays cricket. Here I want to... (2 Replies)
Discussion started by: mukeshbaranwal
2 Replies

7. Shell Programming and Scripting

perl: replace multiple word on a line

Hi All, If I have a line as following: ( MA "vertical" ) How can I convert it to as below: ( BC "horizontal" ) Thanks, --Michael (6 Replies)
Discussion started by: mxn731
6 Replies

8. Programming

PERL, search and replace inside foreach loop

Hello All, Im a Hardware engineer, I have written this script to automate my job. I got stuck in the following location. CODE: .. .. ... foreach $key(keys %arr_hash) { my ($loc,$ind,$add) = split /,/, $arr_hash{$key}; &create_verilog($key, $loc, $ind ,$add); } sub create_verilog{... (2 Replies)
Discussion started by: riyasnr007
2 Replies

9. Shell Programming and Scripting

perl (word by word check if a hash key)

Hi, Now i work in a code that 1-get data stored in the database in the form of hash table with a key field which is the " Name" 2-in the same time i open a txt file and loop through it word by word 3- which i have a problem in is that : I need to loop word by word and check if it is a... (0 Replies)
Discussion started by: eng_shimaa
0 Replies

10. Shell Programming and Scripting

Perl log parcer. (for custom logs details inside)

OS:sol8 ok 2 things are very important. I will give examples of the logs and the client file for testing. Object: to display on the web sometime to parse your custom logs basied on the inputed date and client selected. I know alot of ppl are like who care. but i saw a perl script on here... (1 Reply)
Discussion started by: Optimus_P
1 Replies
Login or Register to Ask a Question
GPT-INSTALL(8)						User Contributed Perl Documentation					    GPT-INSTALL(8)

NAME
gpt-install - Installs GPT packages. SYNOPSIS
gpt-install [options] [packages or bundles] Options: -verbose Print copious output -help Print usage -man Print man page. -version Print GPT version. -force Replace package no matter what. -loose Replace a broader range of packages. -installdir=PATH Override $GLOBUS_LOCATION. -tmpdir=PATH Path to tmp disk space [packages or bundles] List of binary packages and bundles to install. DESCRIPTION
gpt-install takes a GPT described package or bundle and installs it. The program can install either RPM's or GPT packages. OPTIONS
-force forces all action to be taken, regardless of state. -tmpdir Place to unpack bundles. -installdir Directory to which files shall be written. Default is $GLOBUS_LOCATION -loose pgm packages can replace a pgm_static package (and vice versa) or a pgm package with a different flavor. -help Print a brief help message and exits. -man Prints the manual page and exits. -version Prints the version of GPT and exits. EXAMPLES
For the command: gpt-install foo-2.1-gcc32-pgm.tar.gz foo-1.1-gcc32-pgm will be replaced. foo-2.2-gcc32-pgm will B<not> be replaced. It is newer. foo-1.1-vendorcc32-pgm will B<not> be replaced. Wrong flavor. foo-1.1-gcc32-pgm_static will B<not> be replaced. Wrong package type foo-2.2-gcc32-pgm_static will B<not> be replaced. Wrong package type For the command: gpt-install -force foo-2.1-gcc32-pgm.tar.gz foo-1.1-gcc32-pgm will be replaced. foo-2.2-gcc32-pgm will be replaced. foo-1.1-vendorcc32-pgm will B<not> be replaced. Wrong flavor foo-1.1-gcc32-pgm_static will B<not> be replaced. Wrong package type foo-2.2-gcc32-pgm_static will B<not> be replaced. Wrong package type For the command: gpt-install -loose foo-2.1-gcc32-pgm.tar.gz foo-1.1-gcc32-pgm will be replaced. foo-2.2-gcc32-pgm will B<not> be replaced. It is newer. foo-1.1-vendorcc32-pgm will be replaced. foo-1.1-gcc32-pgm_static will be replaced. foo-2.2-gcc32-pgm_static will B<not> be replaced. It is newer. For the command: gpt-install -force -loose foo-2.1-gcc32-pgm.tar.gz foo-1.1-gcc32-pgm will be replaced. foo-2.2-gcc32-pgm will be replaced. foo-1.1-vendorcc32-pgm will be replaced. foo-1.1-gcc32-pgm_static will be replaced. foo-2.2-gcc32-pgm_static will be replaced. BUGS
gpt-install currently does not honor static build numbers. Instead it will replace any pgm_static package that is the same version or older. For example: gpt-install -force foo-2.1-2-gcc32-pgm_static.tar.gz foo-1.1-5-gcc32-pgm_static will be replaced. foo-2.1-1-gcc32-pgm_static will be replaced. foo-2.1-5-gcc32-pgm_static will be replaced. foo-2.2-1-gcc32-pgm_static will not be replaced. foo-2.1-gcc32-pgm will not be replaced. SEE ALSO
gpt-uninstall(1) gpt-query(1) gpt-verify(1) AUTHOR
Michael Bletzinger <mbletzin.ncsa.uiuc.edu> and Eric Blau <eblau.ncsa.uiuc.edu> perl v5.14.2 2012-04-30 GPT-INSTALL(8)