Displays the contents of a file or files, one screen at a time. When redirected to a file, performs some conversions, also depending on the used switches.
grep -i sought.*string Source.txt | more /p >Out.txt
Taking the output of a non-Windows grep command that produces line breaks consisting solely of LF character without CR character, converts LF line breaks to CR-LF line breaks. CR-LF newlines are also known as DOS line breaks, Windows line breaks, DOS newlines, Windows newlines, and CR/LF line endings,as opposed to LF line breaks used by some other operating systems.
In some setups, seems to output gibberish if the input contains LF line breaks and tab characters at the same time.
In some setups, for the conversion,
/pmay be unneeded. Thus,
morewould convert the line breaks even without
more /t4 Source.txt >Target.txt
Converts tab characters to 4 spaces.
In some setups, tab conversion takes place automatically, even without the /t switch. If so, it is per default to 8 spaces.
- The online documentation for
morein Windows XP and Windows Vista does not mention the switch.
- The switch
/eis mentioned in "more /?" at least in Windows XP and Windows Vista.
- Per "more /?", the switch is supposed to enable extended features listed at the end of "more /?" help such as showing the current row on pressing "=". However, in Windows XP and Windows Vista, that seems to be enabled by default even without /e.
- Hypothesis: In Windows XP and Windows Vista, /e does not do anything; it is present for compatibility reasons.
- more at ss64.com
- more at Microsoft, Windows XP
- more at Microsoft, Windows Server 2008, Windows Vista
$ more /? Displays output one screen at a time. MORE [/E [/C] [/P] [/S] [/Tn] [+n]] < [drive:][path]filename command-name | MORE [/E [/C] [/P] [/S] [/Tn] [+n]] MORE /E [/C] [/P] [/S] [/Tn] [+n] [files] [drive:][path]filename Specifies a file to display one screen at a time. command-name Specifies a command whose output will be displayed. /E Enable extended features /C Clear screen before displaying page /P Expand FormFeed characters /S Squeeze multiple blank lines into a single line /Tn Expand tabs to n spaces (default 8) Switches can be present in the MORE environment variable. +n Start displaying the first file at line n files List of files to be displayed. Files in the list are separated by blanks. If extended features are enabled, the following commands are accepted at the -- More -- prompt: P n Display next n lines S n Skip next n lines F Display next file Q Quit = Show line number ? Show help line <space> Display next page <ret> Display next line