LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-05-2010, 10:48 PM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Rep: Reputation: 76
Less and line wraparound.


Hi:

How can I do to make less not to do line wraparound? That is, if there is a line exceeding 80 chars, I want to see only the first 80 ones. Of course, if I wish, I would afterwards be able to see the rest of the line by pressing the End key.

A similar question would go for vim. Thanks for reading.
 
Old 11-06-2010, 06:37 AM   #2
crts
Senior Member
 
Registered: Jan 2010
Posts: 2,020

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Hi,

try to invoke less like
Code:
less -S filename
This will not wrap the lines but chop them instead. You can press the right arrow key if you want to see the rest of the line. Pressing END brings you to the end of the file.
 
Old 11-06-2010, 01:22 PM   #3
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Hi:

I tried it. And it worked. Just as you said. What happened is that less man, in my system, is 1512 lines long. I should have spend a whole day in order to find the option which, even worse, I did not even knew if it existed. But thanks to you, it was a matter of some minutes.

Not satisfied with this, I wanted to do the same with vim. To make a long story short, in www.vim.org>FAQ I saw the word 'wrap'. Then
Code:
$ vim
:help wrap ^D
And my question was magically answered. In a 0 to 1000000 scale, my vim knowledge has raised from about 5 to 5.001!

P.S.: just out of curiosity, was there any particular reason why you chose crts as your LQ username?

Last edited by stf92; 11-06-2010 at 01:36 PM.
 
Old 11-06-2010, 05:07 PM   #4
crts
Senior Member
 
Registered: Jan 2010
Posts: 2,020

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Quote:
Originally Posted by stf92 View Post
P.S.: just out of curiosity, was there any particular reason why you chose crts as your LQ username?
No specific reason. Why? Is it an abbreviation of something that I am not aware of?
 
Old 11-06-2010, 05:23 PM   #5
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Well, to be precise, it is the plural form of an old one: Cathode Ray Tube.
Up to some years ago, it was the usual output console for a programmer. Nowadays, it seems we are in the dawn of a new era, where CRTs will only be an object of curiosity. And to tell you the truth, I was very fond of them. All the best.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
grab the line below a blank line and the line above the next blank line awk or perl? Pantomime Linux - General 7 06-26-2008 08:13 AM
C++ text file line by line/each line to string/array Dimitris Programming 15 03-11-2008 08:22 AM
php - Read file line by line and change a specific line. anrea Programming 2 01-28-2007 01:43 PM
wraparound text 2assist Linux - Newbie 1 09-19-2005 02:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration