Search for a particular word and replace the first character
Hi Unix gurus,
I've a dna sequence in a file format known as fasta format (sequence header starts with > and ignored), an example shown below:
In a file like this I want to do the following three search and replace. The original file becomes three different files based on each search condition.
1) search two character pattern CG and replace that C by the word NULL
2) search three character pattern CXG and replace that C by the word NULL (where X=A,C or T but not G)
3) search three character pattern CXX and replace that C by the word NULL (where X=A,C or T but not G)
Example output based on above file:
File_CG_replace
File_CXG_replace
File_CXX_replace
Thanks for your help.
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)
Hi All
i need to replace the url1 inside <remote> tag in below xml in first instance and in the second instance with url2.
any help appreciated
<locations>
<hudson.scm.SubversionSCM_-ModuleLocation>
<remote>https://svn2015.com/svn/repos/internalshard</remote>
... (4 Replies)
This is for AIX 6.1, I've a flat file and the format is like this
DECLARE
some statements;
BEGIN
some statements;
END;
I've to search BEGIN and replace it with the following 4 lines
BEGIN
For x in 1..1
LOOP
BEGIN
Similarly I've to search END and replace it with the... (7 Replies)
Hello Unix Users,
I am very new to Unix so I am not sure how do I do the following.
I need a script such that when I type the following in the command prompt
> . scriptName.sh wordToBeReplaced DirectoryLocation
will find the word someword located in a somefile.xml in DirectoryLocation... (8 Replies)
Hi Guys,
Req your help in searching and replacing the word that comes after equals(=) symbol
I would like to replace the sting in bold with a string in variable.
d=ABCDF8C44C22
# grep -i NIM_MASTERID ${_NIMINFO}
export NIM_MASTERID=00CDF8C44C00
I'm looking to replace any word that... (4 Replies)
Greetings,
Using vi, how can I change the following text:
-I/myviews/nexus_7400rel/vobs/nexus/platforms/97400/include -I/myviews/nexus_7400rel/vobs/nexus/modules/i2c/7400/include -I/myviews/nexus_7400rel/vobs/nexus/modules/surface/7400/include
Into this:... (4 Replies)
Hi,
I wanted to add a newline character after every 100 characters in a file using a awk or shell without reading each line of the file.
I want to run a command on the complete file.
This does based on a string but i want to add a new line after every 100 characters ir-respective of the... (3 Replies)
Hi,
I am trying to write a shell script designed to take input line by line by line from a file with a word on each line for editing with sed. Example file:
1.ejverything
2.bllown
3.maikling
4.manegement
5.existjing
6.systems
My design currently takes input from the user, and... (2 Replies)
Hi
I would like to accept in a string from user like
username/pwd@dbname
suppose the user does not input @ then i should throw an error that @ symbol missing . How to achieve this
Thanks in advance
Suresh (6 Replies)