Sponsored Content
Full Discussion: delete some columns
Top Forums UNIX for Dummies Questions & Answers delete some columns Post 302117603 by Shell_Life on Tuesday 15th of May 2007 02:38:14 PM
Old 05-15-2007
Here it is:
Code:
cut -d' ' -f1,14 input_file > output_file

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Using 'sed' to delete or ignore columns in a dataset

Hi, I've already posted elsewhere but am posting again here coz im a newbie. I hope you forgive me this time. I want to know if its possible to delete or ignore columns in a large dataset using 'sed'. For example, I have the following dataset: - ... (0 Replies)
Discussion started by: aarif
0 Replies

2. UNIX for Dummies Questions & Answers

Using 'sed' to delete or ignore columns in a dataset

Hi, I want to know if its possible to delete or ignore columns in a large dataset using 'sed'. For example, I have the following dataset: - 20060714,X.XX,1,043004,Q,T,24.0000,1,25.5000,4, 20060714,X.XX,1,081209,Q,T,24.0000,1,25.5000,5, As you can see, there are 10 columns here and the... (4 Replies)
Discussion started by: aarif
4 Replies

3. 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

4. UNIX for Dummies Questions & Answers

delete lines and columns from a file

how do I delete the first 3 lines and the first column and the tab? infile: Colorspace 0 SA-Sample 1 in 32 FTab-Chars 10 Sequence-1 SINE1_7SL 282 Sequence-2 sapieTTns 289 Sequence-3 7SL_Hopns 289outfile: SINE1_7SL 282 sapieTTns 289 7SL_Hopns 289Thanks (4 Replies)
Discussion started by: jdhahbi
4 Replies

5. UNIX for Dummies Questions & Answers

How to delete all columns that start with a specific value

I have this space delimited large text file with more than 1,000,000+ columns and about 100 rows. I want to delete all the columns that start with NA such that: File before modification aa bb cc NA100 dd aa b1 c2 NA101 de File after modification aa bb cc dd aa b1 c2 de How would I... (3 Replies)
Discussion started by: evelibertine
3 Replies

6. Shell Programming and Scripting

Delete rows with particular number of columns

Hello Guys I have a flat file with few thousands of rows. Now each rows have different number of columns I want to delete the rows which has not equal to 749 columns Can you guys please let me know how to do the same Your help is much appreciated. (2 Replies)
Discussion started by: Pratik4891
2 Replies

7. UNIX for Dummies Questions & Answers

Awk match on columns and delete line

Hi, I have a file like this a 1 2 b 2 2 c 2 3 d 4 5 f 5 6 output a 1 2 c 2 3 d 4 5 f 5 6 Basically, I want to delete the whole line if $2 and $3 are the same. Thanks (5 Replies)
Discussion started by: jacobs.smith
5 Replies

8. UNIX for Dummies Questions & Answers

Urgent_need to delete columns with numbers

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

9. Shell Programming and Scripting

Delete columns if a pattern met

Hi, I'd like to ask for some help with the following task, please: there is a big file with a header (this is file.in): NAME A_1.X A_1.Y A_1.Z B_1.X B_1.Y B_1.Z name1 AB 0.11 0.12 BB 0.45 0.67 name2 BB 0.34 0.56 AA 0.89 0.68 what I need is to recognize a pattern in the header of this... (10 Replies)
Discussion started by: zajtat
10 Replies

10. UNIX for Dummies Questions & Answers

Sed: delete columns 7,15,16

An extension from an earlier question. Now need a sed script to delete columns 7,15 and 16 from an example txt below.. Again, thanks in advance. 98M-01.WAV,98M,01,00:00:49,01:07:36:00,"MIX",,"BOOM-MKH50",,,,,,,,,,"", 98L-01.WAV,98L,01,00:00:51,01:01:45:00,"MIX",,"BOOM-MKH50",,,,,,,,,,"", (7 Replies)
Discussion started by: Vrc2250
7 Replies
disktab(4)						     Kernel Interfaces Manual							disktab(4)

NAME
disktab - Disk description file SYNOPSIS
#include <sys/disklabel.h> DESCRIPTION
The disktab database describes disk geometries and disk partition characteristics. It is used to initialize the disk label on the disk. The format is patterned after the termcap terminal database. Entries in a disktab file consist of a number of : (colon) separated fields. The first entry for each disk gives the names which are known for the disk, separated by | (vertical bar) characters. The last name given should be a long name fully identifying the disk. The following list indicates the normal values stored for each disk entry: Type Description str Type of disk (for example, removable, win- chester) str Type of controller (for example, SMD, ESDI, floppy) num Number of sectors per track num Number of tracks per cylinder num Total number of cylinders on the disk num Number of sectors per cylinder, nc*nt default num Number of sectors per unit, sc*nc default num Sector size in bytes, DEV_BSIZE default bool Controller supports bad144-style bad sector forwarding num Rotation speed, rpm, default 3600 num Sector skew per track, default 0 num Sector skew per cylinder, default 0 num Headswitch time, usec, default 0 num One-cylinder seek time, usec, default 0 num Sector interleave (n:1), default 1 num Drive-type-dependent parameters num Boot block size, default BBSIZE num Superblock size, default SBSIZE num Block size for partition `a' (bytes) num Block size for partition `d' (bytes) num Block size for partition `e' (bytes) num Block size for partition `f' (bytes) num Block size for partition `g' (bytes) num Block size for partition `h' (bytes) num Fragment size for partition `a' (bytes) num Fragment size for partition `d' (bytes) num Fragment size for partition `e' (bytes) num Fragment size for partition `f' (bytes) num Fragment size for partition `g' (bytes) num Fragment size for partition `h' (bytes) num Offset of partition `a' in sectors num Offset of partition `b' in sectors num Offset of partition `c' in sectors num Offset of partition `d' in sectors num Offset of partition `e' in sectors num Offset of partition `f' in sectors num Offset of partition `g' in sectors num Offset of partition `h' in sectors num Size of partition `a' in sectors num Size of partition `b' in sectors num Size of partition `c' in sectors num Size of partition `d' in sectors num Size of partition `e' in sectors num Size of partition `f' in sectors num Size of partition `g' in sectors num Size of partition `h' in sectors str Partition type of partition `a' (4.2BSD file system, swap, etc.) str Partition type of partition `b' str Partition type of partition `c' str Parti- tion type of partition `d' str Partition type of partition `e' str Partition type of partition `f' str Partition type of partition `g' str Partition type of partition `h' EXAMPLES
The following is an example disktab entry: rz25|RZ25|DEC RZ25 Winchester: :ty=winchester:dt=SCSI:ns#62:nt#9:nc#1492: :oa#0:pa#131072:ba#8192:fa#1024: :ob#131072:pb#262144:bb#8192:fb#1024: :oc#0:pc#832527:bc#8192:fc#1024: :od#393216:pd#146437:bd#8192:fd#1024: :oe#539656:pe#146437:be#8192:fe#1024: :of#686096:pf#146437:bf#8192:ff#1024: :og#393216:pg#439311:bg#8192:fg#1024: :oh#0:ph#0:bh#8192:fh#1024: FILES
/etc/disktab RELATED INFORMATION
Functions: getdiskbyname(3) Files: disklabel(4) Commands: disklabel(8), newfs(8) delim off disktab(4)
All times are GMT -4. The time now is 02:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy