bash – “less”中的“Chop lines”无效

前端之家收集整理的这篇文章主要介绍了bash – “less”中的“Chop lines”无效前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在做:
less -S my_database_dump.sql

为了看到线条被切断的文件(即换行.)但是它没有工作,线条没有被包裹,我需要水平滚动才能看到整条线.我能做什么?

“chop”表示截断(丢弃行的剩余部分)不折叠(将余数放在下一行的开头).

记录的-S选项对less的行为与您描述的相反.

       -S or --chop-long-lines
              Causes lines longer than the screen width to be  chopped  rather
              than  folded.   That  is,the remainder of a long line is simply
              discarded.  The default is to fold long lines; that is,display
              the remainder on the next line.

(我认为-S的含义是“Scroll Sideways to see end of line”)

尝试省略-S选项.

$wc longlines.txt
      9     128     726 longlines.txt

$less longlines.txt
WHAN that Aprille with his shoures soote The droghte of Marche hath perced to th
e roote,And bathed every veyne in swich licour,Of which vertu engendred is the flour;
Whan Zephirus eek with his swete breeth Inspired hath in every holt and heeth
The tendre croppes,and the yonge sonne Hath in the Ram his halfe cours y-ronne,And smale fowles maken melodye,That slepen al the night with open ye,So priketh hem nature in hir corages: Than longen folk to goon on pilgrimages,And palmers for to seken straunge strondes,To ferne halwes,couthe in sondry lo
ndes;
And specially,from every shires ende Of Engelond,to Caunterbury they wende,The holy blisful martir for to seke,That hem hath holpen,whan that they were se
ke.
longlines.txt (END)

$less -S longlines.txt
WHAN that Aprille with his shoures soote The droghte of Marche hath perced to th
And bathed every veyne in swich licour,couthe in sondry lo
And specially,whan that they were s
longlines.txt (END)

猜你在找的Bash相关文章