Vi editor, copy one column?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Vi editor, copy one column?
Prev   Next
# 1  
Old 12-15-2009
Data Vi editor, copy one column?

This is an vi editor question. I do not know is this a right place to ask this question or not?
I have a file with the following contents,

Code:
10 11 
20 21
30 31

I want to copy first column that is 10,20,30 after second column, so that output will look like the following,
Code:
10 11 10
20 21 20
30 31 30

How can I do that in VI editor through command mode (i.e. ":")?

Last edited by Franklin52; 12-15-2009 at 01:57 PM.. Reason: Please use code tags!
 
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to copy a column of multiple files and paste into new excel file (next to column)?

I have data of an excel files as given below, file1 org1_1 1 1 2.5 100 org1_2 1 2 5.5 98 org1_3 1 3 7.2 88 file2 org2_1 1 1 2.5 100 org2_2 1 2 5.5 56 org2_3 1 3 7.2 70 I have multiple excel files as above shown. I have to copy column 1, column 4 and paste into a new excel file as... (26 Replies)
Discussion started by: dineshkumarsrk
26 Replies

2. UNIX for Dummies Questions & Answers

Copy/paste in vi editor

Hello guys, I am trying to copy a line in vi editor and paste it with below commands but paste command is not working and instead of paste action prints the p character!! I should also mention that the server is Solaris... 1) crontab -e 2) j to move down 3) yy to copy the line 4) o to... (4 Replies)
Discussion started by: Newman
4 Replies

3. Shell Programming and Scripting

Copy from vi Editor ( unix ) to windows

How to copy the complete content from a file in vi Editor to windows ( notepad ). I can use " select " and paste it to windows but this is restricted to current page. Not allowing me to scroll down or up when selecting the content.:confused: (1 Reply)
Discussion started by: frintocf
1 Replies

4. UNIX for Dummies Questions & Answers

Copy huge data into vi editor

Hi All, HP-UX dev4 B.11.11 U 9000/800 3251073457 I need to copy huge data from windows text file to vi editor. when I tried copy huge data, the format of data is not preserverd and appered to scatterd through the vi, something like give below. Please let me know, how can I correct this? ... (18 Replies)
Discussion started by: alok.behria
18 Replies

5. UNIX for Dummies Questions & Answers

Copy/Paste in Vi editor

Dear All, I have a file containing 12 lines. First 3 lines have 9 values and the remaining 9 lines with no values. I was trying to copy and paste these 9 values of the first 3 lines into last 9 lines simultaneously as A=1.491331, B=1.539000 ..... but I don't know how to cope with this... (9 Replies)
Discussion started by: sullah
9 Replies
Login or Register to Ask a Question
gconf-editor(1)                                                    User Commands                                                   gconf-editor(1)

NAME
gconf-editor - view and edit personal desktop configuration preferences SYNOPSIS
gconf-editor DESCRIPTION
The GConf Editor application enables you to view and edit all of your current personal desktop preferences. The GConf Editor window pro- vides a tree view to navigate through the hierarchy of preferences, an edit pane to make changes to individual preferences, and a descrip- tion pane to highlight the documentation associated with the currently selected preference. OPTIONS
None. OPERANDS
None. EXAMPLES
Example 1: Launching GConf Editor example% gconf-editor EXIT STATUS
The following exit values are returned: 0 Application exited successfully >0 Application exited with failure FILES
The following files are used by this application: /usr/bin/gconf-editor Executable for GConf Editor. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability | | +-----------------------------+-----------------------------+ |Interface stability | | +-----------------------------+-----------------------------+ SEE ALSO
Latest version of the GNOME Desktop System Administration Guide for your platform. NOTES
Written by Stephen Browne, Sun Microsystems Inc., 2003. SunOS 5.10 1 Oct 2003 gconf-editor(1)