I am compiling using g++ and the output scrolls many pages. On Unix/Linux I was able to achieve it using pipeline and "more".
Asked
Active
Viewed 648 times
1 Answers
0
On Unix/Linux I was able to achieve it using | more.
Unfortunately git bash does not come with more installed by default.
However, less is more. (pun intended)
You can choose to install more or use | less instead (which is included in git bash):
less
Page through text one screenful at a time, Search through output, Edit the command line. less provides more emulation plus extensive enhancements such as allowing backward paging through a file as well as forward movement.
Source less Man Page - Linux - SS64.com
You can also use an alias to define more:
alias more="less -de"Adding
-dfor--dumband-efor--quit-at-eofmakes this alias closed to what more does by default.Put this alias in
%USERPROFILE%/.bashrc
Source Why can't I use “more” command in Git Bash?, answer by VonC
DavidPostill
- 153,128
- 77
- 353
- 394