Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Removing columns of a file using vi Editor Post 302165486 by DilipPanda on Friday 8th of February 2008 01:36:46 AM
Old 02-08-2008
Removing columns of a file using vi Editor

Hi Experts,

I have a file which looks like in this way
1 2233|A.K Shukla |G.M |Sales |12/12/52|6000
2 9876|Jai Sharma |Director |Production |12/03/50|67000
3 5678|Sumit Chakarborty |D.G.M |Marketing |19/04/43|6000
4 2365|Barun Sengupta |Director |Personnel |11/05/47|7800
5 5423|N.K. Gupta |Chairman |Admin |30/08/56|5400
6 1006|Chanchal Singhvi |Director |Sales |03/09/38|67000
7 6213|Karuna Ganguly |G.M |Accounts |05/06/62|6300
8 1265|S.N. Sengupta |Manager |Sales |12/09/63|5600
9 4290|Jayant Choudhury |Executive |Production |07/09/50|6000
10 2476|Anil Aggarwal |Manager |Sales |01/05/59|5000
11 6521|Lalit Choudhuwdury |Director |Marketing |26/09/45|8200
12 3212|Shyam Saksena |D.G.M |Accounts |12/12/55|6000
13 3564|Sudhir Agarwal |Executive |Personnel |06/07/47|7500
14 2345|J.B Saxena |G.M |Marketing |12/03/45|8000
15 0110|V.K Agrawal |G.M |Marketing |31/12/40|8900

I want to delete the 1st column using vi editor.

How can i do that?

Kindly suggest me

Thanks in Advance
Dilip
 

10 More Discussions You Might Find Interesting

1. HP-UX

How to add space in between columns in VI editor

Hi, I am trying to add space after 3rd and 6th column for editing a file in special format. How should I achieve in VI?. So, is it possible to do in it in sed ? thanks vipa (1 Reply)
Discussion started by: vipas
1 Replies

2. Shell Programming and Scripting

removing spaces betweent columns

Hello Friends, Can any one help me with this issue: I would like to format a file: say if I have rows like: 4512 , SMITH , I-28984 ,, 4324 , 4343 42312 , SMITH , I-2EE8984 ,, 432E4E4 , 4343 I would like to have the output diaplayed like : 4512... (8 Replies)
Discussion started by: sbasetty
8 Replies

3. Shell Programming and Scripting

Removing blank columns from a file

Hi, I have a sample file as shown below -- id parent name dba -----------------------------------... (7 Replies)
Discussion started by: sumirmehta
7 Replies

4. Shell Programming and Scripting

Removing columns with dashes

My files look like this I need to remove the columns where dashes are the majority, if any of the sequences has any character in that particular position it should be removed too. The IDs and Freqs should be kept intact. Thus, the resulting file should look like this Thanks in advance (14 Replies)
Discussion started by: Xterra
14 Replies

5. Shell Programming and Scripting

Removing columns using awk

HI , I want to remove 5th and 6th column from a .csv file using awk.is there any way of this apart from writing the each field as below awk -F, '{print $1,$2,$3,$7......$100}' OFS=, infile. Thx, Deepti (4 Replies)
Discussion started by: gaur.deepti
4 Replies

6. Shell Programming and Scripting

Removing columns using awk

HI , I have a comma delimiter file, in which I want to remove 8th and 9th column. I tried removing those columns using the below code awk 'BEGIN { FS=","; OFS="," } {$8=$9="";gsub(",+",",",$0)}1' infile But the problem is 8th and 9th columns are user entered fields, theyvhave carriage... (1 Reply)
Discussion started by: mora
1 Replies

7. UNIX for Dummies Questions & Answers

Removing columns from a text file that do not have any values in second and third columns

I have a text file that has three columns. But at the end of the text file, there are trailing lines that have missing second and third columns: 4 0.04972604 KLHL28 4 0.0497332 CSTB 4 0.04979822 AIF1 4 0.04983331 DECR2 4 0.04990344 KATNB1 4 4 4 4 How can I remove the trailing... (3 Replies)
Discussion started by: evelibertine
3 Replies

8. UNIX for Dummies Questions & Answers

Removing 2nd Column in Vi Editor

I have text like this M83-306 132 797 M83-312 145 685 M83-315 321 479 M83-319 654 193 M83-350 556 1184 M83-303 222 199 and I want to make it like this M83-306 797 M83-312 685 M83-315 ... (9 Replies)
Discussion started by: muhnandap
9 Replies

9. Shell Programming and Scripting

Removing duplicates in fixed width file which has multiple key columns

Hi All , I have a requirement where I need to remove duplicates from a fixed width file which has multiple key columns .Also , need to capture the duplicate records into another file . File has 8 columns. Key columns are col1 and col2. Col1 has the length of 8 col 2 has the length of 3. ... (5 Replies)
Discussion started by: saj
5 Replies

10. Shell Programming and Scripting

Removing duplicates from delimited file based on 2 columns

Hi guys,Got a bit of a bind I'm in. I'm looking to remove duplicates from a pipe delimited file, but do so based on 2 columns. Sounds easy enough, but here's the kicker... Column #1 is a simple ID, which is used to identify the duplicate. Once dups are identified, I need to only keep the one... (2 Replies)
Discussion started by: kevinprood
2 Replies
XCONSORTIUM(7x) 														   XCONSORTIUM(7x)

NAME
XConsortium - X Consortium information SYNOPSIS
Release 6.3 of X Version 11 was brought to you by X Consortium, Inc. DESCRIPTION
The X Consortium was an independent, not-for-profit Delaware membership corporation. It was formed in 1993 as the successor to the MIT X Consortium. The purpose of the X Consortium was to foster the development, evolution, and maintenance of the X Window System, a comprehen- sive set of vendor-neutral, system-architecture neutral, network-transparent windowing and user interface standards. The X Window System was created in the mid-1980s at the Massachusetts Institute of Technology. In 1988, MIT formed a member-funded consor- tium to provide the technical and administrative leadership necessary to support further development of the X Window System. In 1992, MIT and the membership decided it was in their best interests to move the consortium out of MIT and create an independent, stand-alone organi- zation. All rights to the X Window System were assigned by MIT to X Consortium, Inc. on January 1, 1994. X Consortium, Inc. closed its doors on December 31, 1996. All rights to the X Window System have been assigned to the Open Software Foundation. The X Consortium was financially self-supporting through membership fees. There are no license fees associated with the use of X Window System standards and code developed by the X Consortium. Membership in the X Consortium was open to any organization willing to execute a membership agreement. The X Consortium was a highly participative body. Members were encouraged to actively cooperate with the staff and other members in the design and review of proposed specifications, and in the design, coding and testing of sample implementations of those specifications. The X Consortium accomplished most of its work using electronic mail over the Internet, with individual mailing lists for working groups. Internet electronic mail connectivity was viewed as a requirement for useful participation in X Consortium activities. Meetings were held as necessary, often in conjunction with industry conferences and trade shows. STAFF
President: Bob Scheifler Office Manager: Janet O'Halloran Director of Marketing: Paul Lavallee Director of Engineering: Jim Fournier Manager, X Window System: Matt Landau, emeritus Technical Director, X Window System: Ralph Swick Technical Staff, X Window System: Donna Converse, emeritus Stephen Gildea, emeritus Kaleb Keithley Arnaud Le Hors Ralph Mor, emeritus Ray Tice Dave Wiggins, emeritus Managers, CDE Development: Giora Guth Peter Bohnert, emeritus Manager, CDE Quality Engineering: David Brooks CDE Architects: Kevin Samborn Daniel Dardailler, emeritus Technical Staff, CDE Development: Art Barstow Pascale Dardailler David Kaelbling Mitch Greess Robert Seacord Technical Staff, CDE Quality Engineering: Chris Burleson Tom Cavin Sami Mohammed Mark Schuldenfrei Manager, Systems Administration: Kevin Ethier Technical Staff, Systems Administration: Mike Donati Amy Rich, emeritus Anne Salemme BOARD OF DIRECTORS
The X Consortium's activities and affairs were managed under the direction and oversight of a Board of Directors, elected annually by the Members. The Board was responsible for reviewing the achievements of the Consortium, approving planned work, appointing a President and other officers of the Consortium, and setting membership dues. The last Directors were: Robert W. Scheifler, President, X Consortium Dr. Forest Baskett, Senior VP of R&D, Silicon Graphics Computer Systems Harold D. Blair, Apogee International Corp. Roger S. Gourd, Gourd & Associates Dr. Robin Hillyard, Chairman and Chief Technical Officer, Novasoft Systems Don McGovern, General Operations Manager and Executive Dir., Hewlett Packard Peter J. Shaw, Senior VP, NetManage Michael Tobias, President, Tech-Source, Inc. ADDRESS
To reach the X Consortium public Wide World Web server, use the URL: http://www.x.org/ To reach the X Consortium public ftp machine, use anonymous ftp to: ftp.x.org FULL MEMBERS
Adobe Systems Inc. Cray Research, Inc. Digital Equipment Corp. Fujitsu Limited Hewlett-Packard Company Hitachi Ltd. IBM Corporation Megatek Corp. Motorola, Inc. NEC Corporation Novell, Inc. Oki Electric Industry Co., Ltd. OMRON Corporation SCO, Inc. Siemens Nixdorf Informationssysteme AG Silicon Graphics, Inc. Sony Corporation Sun Microsystems, Inc. Tektronix, Inc. ASSOCIATE MEMBERS
Boundless Technologies Hummingbird Communications Ltd. Insignia Solutions, Ltd. Mercury Interactive Corp. NetManage, Inc. Network Computing Devices VisiCom Laboratories, Inc. Walker Richer & Quinn, Inc. END USERS
Hughes Aircraft Company AFFILIATE MEMBERS
ASTEC, Inc. BARCO Chromatics, Inc. CenterLine Software, Inc. CliniComp, Intl. Component Integration Laboratories, Inc. Draper Laboratory. Electronic Book Technologies, Inc. Gallium Software, Inc. Georgia Institiute of Technology Human Designed Systems, Inc. INRIA - Institut National de Recherche en Informatique et en Automatique Integrated Computer Solutions, Inc. Investment Management Services, Inc. Jupiter Systems KL Group Inc. Massachusetts Institute of Technology Metheus Corporation Metro Link, Inc. Object Management Group, Inc. Open Software Foundation Performance Awareness Corp. Peritek Corp. Petrotechnical Open Software Corp. Point Technologies, Inc. Shiman Associates, Inc. Smithsonian Astrophysical Observatory. Software Development Corp. SOUM Corporation Spectragraphics Corp. Tech-Source, Inc. TriTeal Corp. White Pine Software, Inc. World Wide Web Consortium. The XFree86 Project, Inc. X Inside, Inc. X Version 11 Release 6.6 XCONSORTIUM(7x)
All times are GMT -4. The time now is 04:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy