vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I was convinced this was a moment of retardation at first. The machines are all solaris 10, various updates and various hardware. Mission was to copy and paste a line in vi say 500 times. I tried the usual yy, to copy the line I wanted, then 500p It only pasted one line. Tried a bunch of other machines, no dice. Had another person try the same task, they failed as well and were like WTF is going on here. Talked to the programmers, they only use vim, where this does work. I come from a BSD world, where vi is really nvi, and this works just fine. Is there a reason this pretty basic behavior doens't work on the sun standard vi, or is there something that would make it not work? |
| |||
| Cydrome Leader <[email protected]> writes: > >The machines are all solaris 10, various updates and various hardware. >Mission was to copy and paste a line in vi say 500 times. I tried the >usual yy, to copy the line I wanted, then 500p > IIRC, Sun's vi, like /bin/sh, traces its ancestry back to the version provided in AT&T's SRV4 Unix almost 20 years ago (1989). Since the SVR4 blend of BSD and System V Unixes was a joint project by AT&T and Sun (and others), the Solaris vi might even go all the way back to the original version created at Berkeley in the late 70s. Occaisionally, I've noticed some inconsistencies in how the Solaris vi handles count/repeat prefixes among the different commands. I just figured they were things from the original code that Sun never enhanced. I think the few times I've needed to replicate a single line in this way, I did some manual yanking and pasting ('p' ten times, then '10yy' and 'p' ten times, then '100yy' and 'p' 5 times). Or wrote a shell loop to append the line to the file 500 times. I've looked through my old O'Reilly nutshell handbook on vi and found a couple of potential ways to do it with ex commands, but I don't have a way to test them at the moment. -Greg -- Do NOT reply via e-mail. Reply in the newsgroup. |