This is weird. As in, *deeply* weird. I ssh as root from one box to another (there are keys involved), and I go to vi a file, such as # line 1 # # line 2 # # line 3 # line 4 And what I see in vi is # line 3 # line 4 BUT, if I scroll the cursor over each line with the arrow key... I see all four lines. I've also looked at another file, and same thing. Just checked it out on the server I ssh'd in from, and no problem. And now, I just ssh'd in from another windows, same way... and the weirdness isn't there. Anyone have any clues as to what's going on with that one session? mark file
On 4/27/16, 9:39 AM, "centos-bounces at centos.org on behalf of m.roth at 5-cent.us" <centos-bounces at centos.org on behalf of m.roth at 5-cent.us> wrote:> And now, I just >ssh'd in from another windows, same way... and the weirdness isn't there. > >Anyone have any clues as to what's going on with that one session? > > MarkIt sounds as if, for some reason, in that one session, vi doesn?t know what your terminal settings are, so it?s in line editing mode (like ed or ex). I don?t have an explanation as to why it would only happen with that one session, though. --- Mike VanHorn Senior Computer Systems Administrator College of Engineering and Computer Science Wright State University 265 Russ Engineering Center 937-775-5157 michael.vanhorn at wright.edu http://www.cecs.wright.edu/~mvanhorn/
> Date: Wednesday, April 27, 2016 13:43:00 +0000 > From: "Vanhorn, Mike" <michael.vanhorn at wright.edu> > > On 4/27/16, 9:39 AM, "centos-bounces at centos.org on behalf of > m.roth at 5-cent.us" <centos-bounces at centos.org on behalf of > m.roth at 5-cent.us> wrote: > >> And now, I just >> ssh'd in from another windows, same way... and the weirdness isn't >> there. >> >> Anyone have any clues as to what's going on with that one session? >> >> Mark > > It sounds as if, for some reason, in that one session, vi doesn?t > know what your terminal settings are, so it?s in line editing > mode (like ed or ex). I don?t have an explanation as to why it > would only happen with that one session, though. >Or your "colors" could be set oddly in that terminal window/vi session. Unfortunately you are giving almost no details - OSs (original and target machine), shells, terminal settings, etc., so it's hard to do more than jump to potentially rash conclusions.
On Wed, April 27, 2016 8:39 am, m.roth at 5-cent.us wrote:> This is weird. As in, *deeply* weird. > > I ssh as root from one box to another (there are keys involved), and I go > to vi a file, such as > # line 1 # > # line 2 # > # line 3 > # line 4 > > And what I see in vi is > # line 3 > # line 4 > > BUT, if I scroll the cursor over each line with the arrow key... I see all > four lines. I've also looked at another file, and same thing. Just checked > it out on the server I ssh'd in from, and no problem. And now, I just > ssh'd in from another windows, same way... and the weirdness isn't there. > > Anyone have any clues as to what's going on with that one session? >Mark, I can not reproduce it. I ssh (with the key) from FrraBSD 9.3 box (from either /bin/sh Bourne shell or /usr/local/bin/bash Bourne again shell) to centos 5 (fully updated, bash shell), and my vi does behave as expected, it is: which vi /bin/vi vi -V ~ ~ VIM - Vi IMproved ~ ~ version 7.0.237 ~ by Bram Moolenaar et al. ~ Vim is open source and freely distributable I guess we need more detail about what you have. Here is the file I open with vi: cosmo ~]# cat test # line 1 # # line 2 # # line 3 # line 4 Here is what I see when I open it with vi: cosmo ~]# vi test # line 1 # # line 2 # # line 3 # line 4 ~ Valeri> mark > > file > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos >++++++++++++++++++++++++++++++++++++++++ Valeri Galtsev Sr System Administrator Department of Astronomy and Astrophysics Kavli Institute for Cosmological Physics University of Chicago Phone: 773-702-4247 ++++++++++++++++++++++++++++++++++++++++
On Wed, Apr 27, 2016 at 09:39:10AM -0400, m.roth at 5-cent.us wrote:> This is weird. As in, *deeply* weird. > > I ssh as root from one box to another (there are keys involved), and I go > to vi a file, such as > # line 1 # > # line 2 # > # line 3 > # line 4 > > And what I see in vi is > # line 3 > # line 4 > > BUT, if I scroll the cursor over each line with the arrow key... I see all > four lines. I've also looked at another file, and same thing. Just checked > it out on the server I ssh'd in from, and no problem. And now, I just > ssh'd in from another windows, same way... and the weirdness isn't there. > > Anyone have any clues as to what's going on with that one session?That sounds like a file generated from different OS's that have different end of line terminators. For example a line like this: # line 1 #\r# line 3\n (\r == CR, \n == NL) might display as just "# line 3" because the cursor returned to the beginning of the line at the "\r". Jon -- Jon H. LaBadie jon at jgcomp.com 11226 South Shore Rd. (703) 787-0688 (H) Reston, VA 20190 (703) 935-6720 (C)