Copy huge data into vi editor


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Copy huge data into vi editor
# 1  
Old 08-09-2011
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?

Code:
smrtprod=
  (DESCRIPTION =
      (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = oraprod2.am.elcompanies.net)(PORT = 1521))
              )
                  (CONNECT_DATA =
                        (SID = smrtprod)
                            )
                              )


                              TWSPROD =
                                (DESCRIPTION =
                                    (ADDRESS = (PROTOCOL = TCP)(HOST = oraprod4.am.elcompanies.net)(PORT = 1534))
                                        (CONNECT_DATA =
                                              (SERVER = DEDICATED)
                                                    (SERVICE_NAME = twsprod.am.elcompanies.net)
                                                        )
                                                          )

                                                          rds01 =
                                                            (DESCRIPTION =
                                                                (ADDRESS = (PROTOCOL = TCP)(HOST = rnd1.us.estee.com)(PORT = 1521))
                                                                    (CONNECT_DATA =
                                                                          (SERVER = DEDICATED)
                                                                                (SERVICE_NAME = rds01.us.estee.com)
                                                                                    )
                                                                                      )

                                                                                      rdsqa =
                                                                                        (DESCRIPTION =
                                                                                            (ADDRESS = (PROTOCOL = TCP)(HOST = dev4.us.estee.com)(PORT = 1533

# 2  
Old 08-09-2011
It appears that you have auto-indent switched on.

Switch it off with (from the VI command mode) :set noai

(or disable it completely by removing the same from .exrc in your home directory, or wherever it lives)
# 3  
Old 08-10-2011
:set paste would work if not :set noai
# 4  
Old 08-10-2011
Or it's possible just
Code:
:r YOURFILE

# 5  
Old 08-11-2011
It's not working. I did vi :set noai test.sql. Following are the appearance inside the vi.
I've used all the options with different permutaion and combination.
Code:
cpmqa> vi -c set noai
"noai" [New file]
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

                                            ('INVAUDEEINDXPART')

# 6  
Old 08-11-2011
can u try this in vi esc mode.

1. go to the first line
2. press the esc key
3. press how many number of lines u want to align it,
4. press =
5. enter

Ex :
If i want to align first 20 lines,
then,

1. go to first line
2. press esc key
3. 20=
4. enter
# 7  
Old 08-11-2011
still notout of the woods.
I followed.

1. vi tst.sql
2. i was already at 1st line. did the escape and 100= to align 100 lines then did the paste. it turns out to be..

Code:
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

 
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