Number of lines in vi


 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Number of lines in vi
# 1  
Old 04-18-2019
Number of lines in vi

Is there a limit on the number of lines that can be copied into vi editor from another file? When I copy some data items from a file into the vi, I see a limit of 1780 lines can be pasted. After that there seems to be a limit.
How can this be increased?
As an example:, I open an excel file which has about 5000 records, which I am copying and pasting into a file, using vi editor. I then find that only 1780 records are getting copied. After that, it is not getting pasted. Is there a limitation in vi? Or can this be increased?
# 2  
Old 04-18-2019
ex, vi, vim, elvis? Depending on your OS and the fact that vi started out as ex.

W cannot help much until you let us know a little more about your system. And the limit is the size of the file, so something else is going on here if you think it is line limited.

FWIW - ex sets the limit:
For source code, start here with illumos-gate:
GitHub - illumos/illumos-gate: Community developed and maintained version of the OS/Net consolidation
/usr/src/cmd/vi/port/ex_temp.h
/usr/src/cmd/vi/port/ex_temp.c

Last edited by jim mcnamara; 04-18-2019 at 11:43 PM..
# 3  
Old 04-19-2019
On second thought - try using vim instead. vi has line size limits that vim does not have, for example.
The user interface is pretty much identical to vi. The config files are a little different from vi.

I am assuming you are not on HP-UX, but are on Linux.
This User Gave Thanks to jim mcnamara For This Post:
# 4  
Old 04-19-2019
Could that be due to the size of the (internal) paste buffer size?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Print number of lines for files in directory, also print number of unique lines

I have a directory of files, I can show the number of lines in each file and order them from lowest to highest with: wc -l *|sort 15263 Image.txt 16401 reference.txt 40459 richtexteditor.txt How can I also print the number of unique lines in each file? 15263 1401 Image.txt 16401... (15 Replies)
Discussion started by: spacegoose
15 Replies

2. Shell Programming and Scripting

Number of Lines in a file

Hi All, This is my Scenario: I wanted to check if a particular name or pattern is present in a file based of that rest of the program should proceed. I want to print '0' if no matching found. v_File_Count=`grep -i "$v_Name_Pattern" $File_Path/Master_File_List.txt | wc -l` The above command... (5 Replies)
Discussion started by: TechGyaann
5 Replies

3. Shell Programming and Scripting

Grep lines for number greater than given number

Hello, I am newbie to bash scripting. Could someone help me with the following. I have log file with output as shown below **************************LOG************************* 11/20/2013 9:11:23.64 Pinging xx.xx.xx.xx with 32 bytes of data: 11/20/2013 9:11:23.64 Reply from xx.xx.xx.xx:... (4 Replies)
Discussion started by: meena_2013
4 Replies

4. Shell Programming and Scripting

Number of lines smaller than specified value

Hi All, I have a problem to find number of lines per column smaller than the values given in a different file. In example, compare the 1st column of file1 with the 1st line of the file2, 2nd column of file1 with the 2nd line of the file2, etc cat file1 0.2 0.9 0.8 0.5 ... 0.6 0.5... (9 Replies)
Discussion started by: senayasma
9 Replies

5. Shell Programming and Scripting

Awk number of lines

How do I get the last NR of a csv file? If I use the line awk -F, '{print NR}' csvfile.csv and there are 42 lines, I get: ... 39 40 41 42 How do I extract the last number, which in this case is 42? ---------- Post updated at 11:05 AM ---------- Previous update was at 10:57 AM... (1 Reply)
Discussion started by: locoroco
1 Replies

6. Shell Programming and Scripting

count the number of lines that start with the number

I have a file with contents similar to this. abcd 1234 4567 7666 jdjdjd 89289 9382 92 jksdj 9823 298 I want to write a shell script which count the number of lines that start with the number (disregard the lines starting with alphabets) (1 Reply)
Discussion started by: grajp002
1 Replies

7. Shell Programming and Scripting

Number lines of file and assign variable to each number

I have a file with a list of config files numbered on the lefthand side 1-300. I need to have bash read each lines number and assign it to a variable so it can be chosen by the user called by the script later. Ex. 1 some data 2 something else 3 more stuff which number do you... (1 Reply)
Discussion started by: glev2005
1 Replies

8. UNIX for Dummies Questions & Answers

deleting lines by number

Is it possible to delete lines by their number? Also, I'd like to delete the last 3 rows of a file too. So from the front and back. Thanks. (9 Replies)
Discussion started by: cary530
9 Replies

9. Shell Programming and Scripting

Appending line number to each line and getting total number of lines

Hello, I need help in appending the line number of each line to the file and also to get the total number of lines. Can somebody please help me. I have a file say: abc def ccc ddd ffff The output should be: Instance1=abc Instance2=def Instance3=ccc Instance4=ddd Instance5=ffff ... (2 Replies)
Discussion started by: chiru_h
2 Replies

10. Shell Programming and Scripting

total number of lines

Hi have following file |abcd 2|abcd |sdfh |sdfj I want to find total number of files haivng nothing in feild 1 using awk will command awk -F "|" '( $1=="") {print NR}' test_awk will work??? (4 Replies)
Discussion started by: mahabunta
4 Replies
Login or Register to Ask a Question