Copy huge data into vi editor


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Copy huge data into vi editor
# 15  
Old 08-12-2011
@pludi, not sure if :set paste works in vi. It may be valid only in vim.

@alok, the option that scottn had suggested earlier should work fine (both in vi and vim).

Try this:
  1. Start vi
  2. type :set noai nosm
  3. hit Enter
  4. hit i (for insert mode)
  5. now paste from the clipboard.
Note: The nosm may not be needed. It shows matching braces/parens as you paste, if that option is turned on, by default. It may slow down the paste.

Smilie
- GP
# 16  
Old 08-15-2011
Is it possible you are copying tabs which are being expanded in vi? Type
Code:
:set list

to see. Tabs will show as a ^I and carriage returns as a $.

If so, you may need to set the tab stop to a different length like
Code:
:set ts=2

or do a search and replace them with spaces maybe, depending on what you need to do.
# 17  
Old 08-16-2011
You are almost there, I do see, tabs appearing in ^1 and carrige return showing $ to me.
I also tried to set out :set ts=2, but again, it's not doing any good to me. One more thing, how can I correct this behaviour?

Code:
set pagesize 100
set linesize 200
break on report

                                                                                    compute sum of free_mb on report

                                                                                    compute sum of act_size on report

                                                                                    compute sum of used_mb on report

                                                                                    col %used format 999.99

                                                                                    col %Free format 999.99

                                                                                    col act_size format 99,99,999.99

                                                                                    col free_mb format 99,99,999.99

                                                                                    col used_mb format 99,99,999.99

                                                                                    col file_name for a60

                                                                                    col largest_extent_MB format 99,99,999.99

                                                                                    col tablespace for a25




           select SUBSTR(a.tablespace_name,1,20) "TABLESPACE",act_size,free_mb,

           free_mb*100/act_size "%FREE",

           act_size-free_mb used_MB,((act_size-free_mb)*100)/act_size "%USED",largest_extent_MB

           from (SELECT TABLESPACE_NAME,SUM(BYTES)/1024/1024 FREE_MB,

           max(bytes)/1024/1024 largest_extent_MB

           FROM DBA_FREE_SPACE group by tablespace_name) a,

           (SELECT TABLESPACE_NAME,SUM(BYTES)/1024/1024 ACT_SIZE FROM

           DBA_DATA_FILES group by tablespace_name) b

           where a.tablespace_name(+)=b.tablespace_name

           --order by 1

           and a.tablespace_name in

           ('FDR')

           order by 1

# 18  
Old 08-17-2011
Try removing tabs after pasting into vi?

Code:
:%s/<Ctrl-V><Ctrl-I>//g

Explanation:
:%                 = on every line
s/<Ctrl-V><Ctrl-I> = search for a tab
//                 = replace with nothing
g                  = do it on every occurrence in a line

Note: to tell vi you will be entering a control character, press Ctrl-V, then the sequence for the character. In this case a tab key.
# 19  
Old 08-31-2011
Thanks a lot GP, your solution worked like a charm

hare krishna
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

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

2. Solaris

The Fastest for copy huge data

Dear Experts, I would like to know what's the best method for copy data around 3 mio (spread in a hundred folders, size each file around 1kb) between 2 servers? I already tried using Rsync and tar command. But using these command is too long. Please advice. Thanks Edy (11 Replies)
Discussion started by: edydsuranta
11 Replies

3. Shell Programming and Scripting

Aggregation of huge data

Hi Friends, I have a file with sample amount data as follows: -89990.3456 8788798.990000128 55109787.20 -12455558989.90876 I need to exclude the '-' symbol in order to treat all values as an absolute one and then I need to sum up.The record count is around 1 million. How... (8 Replies)
Discussion started by: Ravichander
8 Replies

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

5. AIX

Copy huge files system

Dear Guy’s By using dd command or any strong command, I’d like to copy huge data from file system to another file system Sours File system: /sfsapp File system has 250 GB of data Target File system: /tgtapp I’d like to copy all these files and directories from /sfsapp to /tgtapp as... (28 Replies)
Discussion started by: Mr.AIX
28 Replies

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

7. Shell Programming and Scripting

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, 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, 10 11 10 20 21 20... (3 Replies)
Discussion started by: MeetP
3 Replies

8. Shell Programming and Scripting

Split a huge data into few different files?!

Input file data contents: >seq_1 MSNQSPPQSQRPGHSHSHSHSHAGLASSTSSHSNPSANASYNLNGPRTGGDQRYRASVDA >seq_2 AGAAGRGWGRDVTAAASPNPRNGGGRPASDLLSVGNAGGQASFASPETIDRWFEDLQHYE >seq_3 ATLEEMAAASLDANFKEELSAIEQWFRVLSEAERTAALYSLLQSSTQVQMRFFVTVLQQM ARADPITALLSPANPGQASMEAQMDAKLAAMGLKSPASPAVRQYARQSLSGDTYLSPHSA... (7 Replies)
Discussion started by: patrick87
7 Replies

9. UNIX for Dummies Questions & Answers

copy and paste certain many lines of huge file in linux

Dear All, I am working with windoes OS but remote a linux machine. I wonder the way to copy an paste some part of a huge file in linux machine. the contain of file like as follow: ... dump annealling all custom 10 anneal_*.dat id type x y z q timestep 0.02 run 200000 Memory... (2 Replies)
Discussion started by: ariesto
2 Replies

10. Shell Programming and Scripting

How to extract data from a huge file?

Hi, I have a huge file of bibliographic records in some standard format.I need a script to do some repeatable task as follows: 1. Needs to create folders as the strings starts with "item_*" from the input file 2. Create a file "contents" in each folders having "license.txt(tab... (5 Replies)
Discussion started by: srsahu75
5 Replies
Login or Register to Ask a Question