Sponsored Content
Top Forums UNIX for Dummies Questions & Answers delete lines and columns from a file Post 302448676 by jdhahbi on Thursday 26th of August 2010 03:49:15 PM
Old 08-26-2010
delete lines and columns from a file

how do I delete the first 3 lines and the first column and the tab?

infile:
Code:
Colorspace    0
SA-Sample    1 in 32
FTab-Chars    10
Sequence-1    SINE1_7SL    282
Sequence-2    sapieTTns    289
Sequence-3    7SL_Hopns    289

outfile:
Code:
SINE1_7SL    282
sapieTTns    289
7SL_Hopns    289

Thanks
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to delete last 3 columns in a file

Hii I have a file which contains huge amounts of data.I just want to delete last 3 columns in the without changing its format.The file contains data as shown below PDE 2001 10 29 202148.60 38.92 24.20 33 4.8 MLATH .F. ....... PDE 2001 10 29 203423.57 38.88 24.41 33 3.7 MLATH... (3 Replies)
Discussion started by: reva
3 Replies

2. Shell Programming and Scripting

How to delete lines in a file that have duplicates or derive the lines that aper once

Input: a b b c d d I need: a c I know how to get this (the lines that have duplicates) : b d sort file | uniq -d But i need opossite of this. I have searched the forum and other places as well, but have found solution for everything except this variant of the problem. (3 Replies)
Discussion started by: necroman08
3 Replies

3. UNIX for Dummies Questions & Answers

Adding lines and columns to a file

Hi everybody, I've got two simples file1 like: aaa aaa aaa bbb bbb bbb ccc ccc ccc and file2 like: 111 111 111 222 222 222 333 333 333 I need to: 1) add a line say "new line" as the first line of the file 2)add a column from file2 (say column3) to file1; the new column should... (14 Replies)
Discussion started by: zajtat
14 Replies

4. UNIX for Dummies Questions & Answers

How get only required lines & delete the rest of the lines in file

Hiiii I have a file which contains huge data as a.dat: PDE 1990 1 9 18 51 28.90 24.7500 95.2800 118.0 6.1 0.0 BURMA event name: 010990D time shift: 7.3000 half duration: 5.0000 latitude: 24.4200 longitude: 94.9500 depth: 129.6000 Mrr: ... (7 Replies)
Discussion started by: reva
7 Replies

5. UNIX for Advanced & Expert Users

In a huge file, Delete duplicate lines leaving unique lines

Hi All, I have a very huge file (4GB) which has duplicate lines. I want to delete duplicate lines leaving unique lines. Sort, uniq, awk '!x++' are not working as its running out of buffer space. I dont know if this works : I want to read each line of the File in a For Loop, and want to... (16 Replies)
Discussion started by: krishnix
16 Replies

6. UNIX for Dummies Questions & Answers

Delete large number of columns rom file

Hi, I have a data file that contains 61 columns. I want to delete all the columns except columns, 3,6 and 8. The columns are tab de-limited. How would I achieve this on the terminal? Thanks (2 Replies)
Discussion started by: lost.identity
2 Replies

7. UNIX for Dummies Questions & Answers

How to delete columns with numbers in an excel file?

Dear all, I have one file (see below) with more then 100 columns and 2500 rows, and need only column which has GType in label with Alphabets, please help me to remove these columns with numbers. input file is n.201.GType n-201.Theta n-201.R n_1.GType n_1.Theta n_1.R... (6 Replies)
Discussion started by: AAWT
6 Replies

8. Shell Programming and Scripting

Delete 40 lines after every 24 lines from a file

Hello, I have file of more than 10000 lines. I want to delete 40 lines after every 20 lines. e.g from a huge file, i want to delete line no from 34 - 74, then 94 - 134 etc and so on. Please let me know how i can do it. Best regards, (11 Replies)
Discussion started by: nehashine
11 Replies

9. Shell Programming and Scripting

Delete and insert columns in a tab delimited file

Hi all , I have a file having 12 columns tab delimited . I need to read this file and remove the column 3 and column 4 and insert a word in column 3 as "AVIALABLE " Is there a way to do this . I am trying like below Thanks DJ cat $FILENAME|awk -F"\t" '{ print $1 "\t... (3 Replies)
Discussion started by: Hypesslearner
3 Replies

10. UNIX for Beginners Questions & Answers

Delete columns with a specific title XXX, where the position change in each file

Goodmorning, I know how to cut a string and a column, and how to find a word. I have a file with over 100 columns. All columns have a title in the first line. I have to delete all columns with the XXX title. I can't use cut -f because the position of XXX columns change in each file, and in... (14 Replies)
Discussion started by: echo manolis
14 Replies
Ace::Sequence::Homol(3pm)				User Contributed Perl Documentation				 Ace::Sequence::Homol(3pm)

NAME
Ace::Sequence::Homol - Temporary Sequence Homology Class SYNOPSIS
# Get all similarity features from an Ace::Sequence @homol = $seq->features('Similarity'); # sort by score @sorted = sort { $a->score <=> $b->score } @homol; # the last one has the highest score $best = $sorted[$#sorted]; # fetch its associated Ace::Sequence::Homol $homol = $best->target; # print out the sequence name, DNA, start and end print $homol->name,' ',$homol->start,'-',$homol->end," "; print $homol->asDNA; DESCRIPTION
Ace::Sequence::Homol is a subclass of Ace::Object (not Ace::Sequence) which is specialized for returning information about a DNA or protein homology. This is a temporary placeholder for a more sophisticated homology class which will include support for alignments. OBJECT CREATION
You will not ordinarily create an Ace::Sequence::Homol object directly. Instead, objects will be created in response to an info() or group() method call on a similarity feature in an Ace::Sequence::Feature object. If you wish to create an Ace::Sequence::Homol object directly, please consult the source code for the new() method. OBJECT METHODS
Most methods are inherited from Ace::Object. The following methods are also supported: start() $start = $homol->start; Returns the start of the area that is similar to the Ace::Sequence::Feature from which his homology was derived. Coordinates are relative to the target homology. end() $end = $homol->end; Returns the end of the area that is similar to the Ace::Sequence::Feature from which his homology was derived. Coordinates are relative to the target homology. asString() $label = $homol->asString; Returns a human-readable identifier describing the nature of the feature. The format is: $name/$start-$end for example: HUMGEN13/1-67 This method is also called automatically when the object is treated in a string context. SEE ALSO
Ace, Ace::Object, Ace::Sequence,Ace::Sequence::FeatureList, Ace::Sequence::Feature, GFF AUTHOR
Lincoln Stein <lstein@w3.org> with extensive help from Jean Thierry-Mieg <mieg@kaa.crbm.cnrs-mop.fr> Copyright (c) 1999, Lincoln D. Stein This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See DISCLAIMER.txt for disclaimers of warranty. perl v5.14.2 2001-09-17 Ace::Sequence::Homol(3pm)
All times are GMT -4. The time now is 03:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy