Sponsored Content
Top Forums Shell Programming and Scripting remove brackets and put it in a column and remove repeated entry Post 302683527 by manigrover on Wednesday 8th of August 2012 07:06:59 AM
Old 08-08-2012
remove brackets and put it in a column and remove repeated entry

Hi all,


I want to remove the remove bracket sign ( ) and put in the separate column I also want to remove the repeated entry like in first row in below input (PA156) is repeated

Code:
ESR1 (PA156) leflunomide (PA450192)  (PA156) leflunomide (PA450192) 
CHST3 (PA26503) docetaxel (PA449383);thalidomide (PA451644)  (PA26503) docetaxel (PA449383);thalidomide (PA451644)  (PA26503) docetaxel (PA449383);thalidomide (PA451644)  (PA26503) docetaxel (PA449383);thalidomide (PA451644)  (PA26503) docetaxel (PA449383);thalidomide (PA451644)  (PA26503) docetaxel (PA449383);thalidomide (PA451644)  (PA26503) docetaxel (PA449383);thalidomide (PA451644) 
LPL (PA232) fenofibrate (PA449594) 
GALNT14 (PA134920089) cisplatin (PA449014);fluorouracil (PA128406956);mitoxantrone (PA450526)  (PA134920089) cisplatin (PA449014);fluorouracil (PA128406956);mitoxantrone (PA450526)  (PA134920089) cisplatin (PA449014);fluorouracil (PA128406956);mitoxantrone (PA450526)  (PA134920089) cisplatin (PA449014);fluorouracil (PA128406956);mitoxantrone (PA450526)  (PA134920089) cisplatin (PA449014);fluorouracil (PA128406956);mitoxantrone (PA450526)  (PA134920089) cisplatin (PA449014);fluorouracil (PA128406956);mitoxantrone (PA450526)  (PA134920089) cisplatin (PA449014);fluorouracil (PA128406956);mitoxantrone (PA450526) 
CTLA4 (PA27006) glatiramer acetate (PA449760





I want output for first row and other rows shuld be like this format

Code:
ESR1  PA156  leflunomide  PA450192  leflunomide PA450192


Last edited by manigrover; 08-08-2012 at 10:24 AM.. Reason: code tags
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Remove repeated line using Perl

I am new to Perl and in text file of around 1000 lines having around 500 repeated line which I felt is no use and want to remove these line.so can somebody help in same for providing sample code how can i remove these repeated line in a file. (11 Replies)
Discussion started by: dinesh.4126
11 Replies

2. Shell Programming and Scripting

Remove text between brackets

How can I use bash to remove all text between "<" and ">" in a file? (1 Reply)
Discussion started by: locoroco
1 Replies

3. Shell Programming and Scripting

Remove brackets { } in the data

Hello folks, I have a data file in which each line has 54 numbers, and every 3 numbers are bracketed. So totally 18 pairs of brackets in each line. A typical line is like: {29.187000274658203 -16.148000717163086 -0.9380000233650208} {30.63800048828125 -15.977999687194824... (5 Replies)
Discussion started by: rockytodd
5 Replies

4. Shell Programming and Scripting

Finding most repeated entry in a column and giving the count

Please can you help in providing the most repeated entry in the 2nd column and give its count Here is an input file 1, This , is a forum 2, This , is a forum 1, There , is a forum 2, This , is not right Here the most repeated entry is "This" and count is 3 So output... (4 Replies)
Discussion started by: necro98
4 Replies

5. Shell Programming and Scripting

Remove brackets repeats and separate in columns

Hi all, I want to remove the remove bracket sign ( ) and put in the separate column I also want to remove the repeated entry like in first row in below input (PA156) is repeated ESR1 (PA156) leflunomide (PA450192) (PA156) leflunomide (PA450192) CHST3 (PA26503) docetaxel... (4 Replies)
Discussion started by: manigrover
4 Replies

6. Shell Programming and Scripting

Remove whatever is mention in brackets

Hi all My previous question was complicated let me simplify it I have to just remove whatever is present in bracket () along with brackets ERCC1 (PA155) Platinum compounds (PA164713176) Allele A is not associated with response to Platinum compounds in women with Ovarian Neoplasms as... (2 Replies)
Discussion started by: Priyanka Chopra
2 Replies

7. Shell Programming and Scripting

Remove regularly repeated lines

How can i delete some regular repeated lines in a file? example: in_file EDGE 1 2 12 EDGE 2 3 23 EDGE 3 4 34 EDGE 5 6 56 EDGE 6 7 67 EDGE 7 8 78 EDGE 9 10 910 EDGE 10 11 1011 EDGE 11 12 1112 EDGE 13 14 1314 EDGE 14 15 1415 EDGE 15 16 1516 EDGE 17 18 1718 EDGE 18 19 1819 EDGE 19... (8 Replies)
Discussion started by: saeed.soltani
8 Replies

8. Shell Programming and Scripting

Remove everything inside of brackets

I need to use something bash related to remove everything inside of brackets. For example. In the following: abc<def>ghi<jkl>mno the result should be: abcghimno (4 Replies)
Discussion started by: locoroco
4 Replies

9. Shell Programming and Scripting

Remove multiline text between brackets

I have some text in a file like so This is {the first day of} my life. What I would like as output is This is my life. Any text between the curly braces is removed. In the forums I've found statements like sed 's/<*>//g' but the problem is that I think that... (12 Replies)
Discussion started by: climatron
12 Replies

10. Shell Programming and Scripting

Remove repeated letter words

Hi, I have this text file with these words and I need help with removing words with repeated letter from these lines. 1 ama 5 bib 29 bob 2 bub 5 civic 2 dad 10 deed 1 denned 335 did 1 eeee 1 eeeee 2 eke 8... (4 Replies)
Discussion started by: crepe6
4 Replies
rmfdmn(8)						      System Manager's Manual							 rmfdmn(8)

NAME
rmfdmn - removes a file domain SYNOPSIS
/sbin/rmfdmn [-f] domain OPTIONS
Turns off the message prompt. OPERANDS
Specifies the name of an existing file domain. DESCRIPTION
Use the rmfdmn utility to remove an existing, but unused, file domain and all its filesets from the system. When you remove a file domain: The file domain and its filesets are destroyed The directory entry for the file domain in the /etc/fdmns file is deleted AdvFS volumes which were assigned to the file domain are relabeled as unused Before attempting to remove a file domain, unmount all filesets and clone filesets from the domain using the umount command. If you attempt to remove a file domain that has mounted filesets or clone filesets, the system does not remove the file domain. Instead, it dis- plays an error message indicating that a fileset is mounted. For each file domain you attempt to remove, a prompt similar to the following is displayed: rmfdmn accounts_dmn rmfdmn: remove domain accounts_dmn? [yes/no] If you answer n, the file domain remains. If you answer y, it is removed. The default is n, the file domain remains. The -f option is useful for scripts when you do not want to be queried for each file domain. If you choose the -f option, no message prompt is displayed. The rmfdmn command operates as if you responded yes to the prompt. RESTRICTIONS
You must be the root user to use this command. To remove a domain, all filesets and clone filesets must be unmounted. The rmfdmn command can leave a partially-removed domain in the /etc/fdmns directory, for example, should there be a system failure during the remove operation. If this happens, the remnants of the removed domain are put in the /etc/fdmns directory as a file with a name in this format: rmfdmn.domain_name.processid. If you interrupt the rmfdmn command or there is a system failure during its operation, check the /etc/fdmns directory for domain names in this format and use the rmfdmn command to delete them. However, if a partially-removed domain has been in the /etc/fdmns directory for some time, it can be risky to remove it with the rmfdmn command: the partitions might have been put back into use and deleting them would make them unusable. [The rmfdmn command puts an unused option in the fstype field of the disk label when it removes disks.] In this case, use the rm -r command to remove the partially-recovered domain. Unlike the rmfdmn command, the rm command does not alter the fstype field of the disk label. EXAMPLES
The following example removes the accounts_dmn file domain. In this example, the accounts_dmn#credit_fs fileset is mounted on the /mnt3 directory and must be unmounted. When the verification prompt for removing the accounts_dmn is displayed, yes is selected. # umount /mnt3 # rmfdmn accounts_dmn # rmfdmn: remove domain accounts_dmn? [yes/no] # rmfdmn: domain accounts_dmn removed FILES
Contains file domain names and devices. SEE ALSO
mkfdmn(8), advfs(4), showfdmn(8), mount(8) rmfdmn(8)
All times are GMT -4. The time now is 05:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy