Sponsored Content
Top Forums Shell Programming and Scripting How to remove repetitive lines in a file with sed? Post 303022128 by baris35 on Saturday 25th of August 2018 10:08:06 PM
Old 08-25-2018
Hello Aia,
Much appreciated, thank you..


Kind regards
Boris
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Unix Remove repetitive alphabets

Hi, I am trying to write a script that will take 2 or more instances of repetitive alphabets (ZZ) to be removed from a field. This should only happen from beginning and end of a field. For Example : Input File a) ZZZIBM Corporation b) ZZZIBM Corporation ZZZZZ b) IBM ZZZ... (26 Replies)
Discussion started by: msalam65
26 Replies

2. Shell Programming and Scripting

using sed to remove lines

Can somebody explain why my sed command is not working. I do the folloinwg: Generates a binary file to /tmp/x1.out /usr/lib/sa/sa2 -s 4:00 -e 8:00 -i 3600 -A -o /tmp/x1.out decodes the file (no problem so far) sar -f /tmp/x1.out When I do this it does not appear to delete the... (4 Replies)
Discussion started by: BeefStu
4 Replies

3. Shell Programming and Scripting

grep/sed to remove lines in file

Hi, I have a file with values, file1: BELL-1180-1180-81|577:1017| BELL-1180-1180-81|jm10i-auto-stub1/577:102| BELL-1180-1180-81|jm10i-auto-stub1/577:101| BELL-1180-1180-81|jm10i-auto-stub1/577:1700| BELL-1180-1180-81|jm10i-auto-stub1/577:1699| I need to remove the lines which has... (9 Replies)
Discussion started by: giri_luck
9 Replies

4. Shell Programming and Scripting

Print lines between two repetitive patterns

Hi users I have one file which has number of occurrence of one pattern examples Adjustmenttype,11 xyz 10 dwe 9 abd 13 def 14 Adjustmenttype,11 xyz 24 dwe 34 abd 35 def 11 nmb 12 Adjustmenttype, not eleven .... ... ... (2 Replies)
Discussion started by: eranmoh
2 Replies

5. Shell Programming and Scripting

Remove a range of lines from a file using sed

Hi I am having some issue editing a file in sed. What I want to do is, in a loop pass a variable to a sed command. Sed should then search a file for a line that matches that variable, then remove all lines below until it reaches a line starting with a constant. I have managed to write a... (14 Replies)
Discussion started by: Andy82
14 Replies

6. UNIX for Dummies Questions & Answers

How to remove certain lines using sed?

Hi I have the following kind of line sin my file . print ' this is first'. print ' this is firs and next ' ' line continuous '. -- this is entire print line. print ' this is first and next ' ' line continuous and' 'still there now over'. -- this 3lines together a single print line. ... (5 Replies)
Discussion started by: Sivajee
5 Replies

7. Shell Programming and Scripting

How to remove certain lines using sed?

Hi, I am new to unix and i started some scripting recently. Please go through the following script i wrote. #!/bin/sh file='path../tfile' file1='path../tfile1' rmfile='path../test2' C1=1 C2=1 exec 3< $file1 while read LINE1; do read LINE2 <&3 a=$LINE1 b=`expr $LINE2 - 1` ... (1 Reply)
Discussion started by: Subbu123
1 Replies

8. Shell Programming and Scripting

Using sed in a loop/to remove lines contained in variable from file

I've tried numerous commands, but I am not sure how to use sed in a loop. This is what I have: VARZ contains CARD_FILE_LIST and it also contains CARD_FILE_LIST2 so echo "$VARZ" CARD_FILE_LIST CARD_FILE_LIST2 I have a file with 60 lines in /tmp/testfile it and I want those lines deleted... (3 Replies)
Discussion started by: newbie2010
3 Replies

9. Shell Programming and Scripting

I need help to removing repetitive lines

Hello SuperUsers! First i wanna say my english sucks.. Don't hate me for that. :rolleyes: I need to make a Bash for removing smilar lines from an output file. My output file always same. Line 1 & 2 Stays. And others similar to this lines needs to be delete. </UsageData><?xml version="1.0"... (4 Replies)
Discussion started by: morphin
4 Replies

10. Shell Programming and Scripting

sed to remove all lines in file that are not .vcf.gz extention

I am trying to use sed to remove all lines in a file that are nor vcf.gz. The sed below runs but returns all the files with vcf.gz in them, rather then just the ones that end in only that extention. Thank you :). file ... (9 Replies)
Discussion started by: cmccabe
9 Replies
TFBS::Word::Consensus(3pm)				User Contributed Perl Documentation				TFBS::Word::Consensus(3pm)

NAME
TFBS::Word - IUPAC DNA consensus word-based pattern class =head1 DESCRIPTION TFBS::Word is a base class consisting of universal constructor called by its subclasses (TFBS::Matrix::*), and word pattern manipulation methods that are independent of the word type. It is not meant to be instantiated itself. FEEDBACK
Please send bug reports and other comments to the author. AUTHOR - Boris Lenhard Boris Lenhard <Boris.Lenhard@cgb.ki.se> APPENDIX
The rest of the documentation details each of the object methods. Internal methods are preceded with an underscore. new Title : new Usage : my $pwm = TFBS::Matrix::PWM->new(%args) Function: constructor for the TFBS::Matrix::PWM object Returns : a new TFBS::Matrix::PWM object Args : # you must specify the -word argument: -word, # a strig consisting of letters in # IUPAC degenerate DNA alphabet # (any of ACGTSWKMPYBDHVN) ####### -name, # string, OPTIONAL -ID, # string, OPTIONAL -class, # string, OPTIONAL -tags # a hash reference reference, OPTIONAL search_seq Title : search_seq Usage : my $siteset = $pwm->search_seq(%args) Function: scans a nucleotide sequence with the pattern represented by the PWM Returns : a TFBS::SiteSet object Args : # you must specify either one of the following three: -file, # the name od a fasta file (single sequence) #or -seqobj # a Bio::Seq object # (more accurately, a Bio::PrimarySeqobject or a # subclass thereof) #or -seqstring # a string containing the sequence -max_mismatches, # number of allowed positions in the site that do # not match the consensus # OPTIONAL: default 0 search_aln Title : search_aln Usage : my $site_pair_set = $pwm->search_aln(%args) Function: Scans a pairwise alignment of nucleotide sequences with the pattern represented by the word: it reports only those hits that are present in equivalent positions of both sequences and exceed a specified threshold score in both, AND are found in regions of the alignment above the specified conservation cutoff value. Returns : a TFBS::SitePairSet object Args : # you must specify either one of the following three: -file, # the name of the alignment file in Clustal format #or -alignobj # a Bio::SimpleAlign object # (more accurately, a Bio::PrimarySeqobject or a # subclass thereof) #or -alignstring # a multi-line string containing the alignment # in clustal format ############# -max_mismatches, # number of allowed positions in the site that do # not match the consensus # OPTIONAL: default 0 -window, # size of the sliding window (inn nucleotides) # for calculating local conservation in the # alignment # OPTIONAL: default 50 -cutoff # conservation cutoff (%) for including the # region in the results of the pattern search # OPTIONAL: default "70%" to_PWM validate_word length perl v5.14.2 2008-01-24 TFBS::Word::Consensus(3pm)
All times are GMT -4. The time now is 03:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy