File: most.doc

package info (click to toggle)
most 4.7-1.1
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 436 kB
  • ctags: 368
  • sloc: ansic: 4,914; sh: 171; makefile: 110
file content (462 lines) | stat: -rw-r--r-- 17,199 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462



MOST(1)                                                   MOST(1)


NNAAMMEE
       most - browse or page through a text file

SSYYNNOOPPSSIISS
       mmoosstt  [--bbssttvvwwzz]  [++_l_i_n_e_n_o]  [++cc]  [++dd]  [++//_s_t_r_i_n_g]  [_f_i_l_e_-
       _n_a_m_e...]

DDEESSCCRRIIPPTTIIOONN
       _m_o_s_t is a paging program that displays, one windowful at a
       time,  the  contents  of  a file on a terminal.  It pauses
       after each windowful and prints on the window status  line
       the  screen  the  file  name, current line number, and the
       percentage of the file so far displayed.

       Unlike other paging programs, _m_o_s_t is capable of  display-
       ing  an arbitrary number of windows as long as each window
       occupies at least two screen lines.  Each window may  con-
       tain the same file or a different file.  In addition, each
       window has its own mode.  For example, one window may dis-
       play  a  file  with its lines wrapped while another may be
       truncating the lines.  Windows may be `locked' together in
       the  sense  that if one of the locked windows scrolls, all
       locked windows will  scroll.   _m_o_s_t  is  also  capable  of
       ignoring  lines  that are indented beyond a user specified
       value.  This is useful when viewing computer  programs  to
       pick out gross features of the code.  See the `::oo' command
       for a description of this feature.

       In addition to displaying ordinary text  files,  _m_o_s_t  can
       also  display binary files as well as files with arbitrary
       ascii characters.  When a file is read into a buffer, _m_o_s_t
       examines  the  first  32 bytes of the file to determine if
       the file is a binary file and then switches to the  appro-
       priate  mode.   However, this feature may be disabled with
       the --kk option.  See the description of the --bb, --kk, --vv, and
       --tt options for further details.

       Text  files  may  contain  combinations  of underscore and
       backspace characters causing a  printer  to  underline  or
       overstrike.   When  _m_o_s_t  recognizes  this, it inserts the
       appropriate  escape  sequences  to  achieve  the   desired
       effect.   In  addition,  some  files  cause the printer to
       overstrike some characters by  embedding  carriage  return
       characters  in  the  middle  of a line.  When this occurs,
       _m_o_s_t  displays  the  overstruck  character  with  a   bold
       attribute.   This  feature facilitates the reading of UNIX
       man pages or a document produced by _r_u_n_o_f_f.   In  particu-
       lar,  viewing  this  document  with _m_o_s_t should illustrate
       this behavior provided that the underline characters  have
       not  been  stripped.   This  may be turned off with the --vv
       option.

       By default, lines with more characters than  the  terminal
       width  are  not  wrapped  but are instead truncated.  When



                            1 May 1995                          1





MOST(1)                                                   MOST(1)


       truncation occurs, this is indicated by a `$' in  the  far
       right  column  of the terminal screen.  The RIGHT and LEFT
       arrow keys may be used to view lines which extend past the
       margins of the screen.  The --ww option may be used to over-
       ride this feature.  When a window is wrapped, the  charac-
       ter `\' will appear at the right edge of the window.

       Commands are listed below.

OOPPTTIIOONNSS
       --11     VT100  mode.   This  is meaningful only on VMS sys-
              tems.  This option should be used if  the  terminal
              is  strictly a VT100.  This implies that the termi-
              nal does not have the ability to delete and  insert
              multiple  lines.   VT102s and above have this abil-
              ity.

       --bb     Binary mode.  Use this switch when you want to view
              files  containing 8 bit characters.  _m_o_s_t will dis-
              play the file 16  bytes  per  line  in  hexidecimal
              notation.  A typical line looks like:

                   01000000 40001575 9C23A020 4000168D     ....@..u.#. @...

              When  used  with the --vv option, the same line looks
              like:

                   ^A^@^@^@  @^@^U u 9C #A0    @^@^V8D     ....@..u.#. @...

       --kk     `Kanji' option.   Ordinarily,  _m_o_s_t  will  go  into
              binary mode if the file consists of non-ascii char-
              acters.  Sometimes this feature  is  not  desirable
              since  some terminals have a special interpretation
              for eight bit characters.  The --kk option turns  off
              the automatic sensing.

       --ss     Squeeze.   Replace multiple blank lines with a sin-
              gle blank line.

       --zz     option turns off gunzip-on-the-fly.

       --vv     Display control characters as in `^A'  for  control
              A.   Normally _m_o_s_t does not interpret control char-
              acters.

       --tt     Display tabs as `^I'.  This  option  is  meaningful
              only  when  used with the --vv option.  ++_l_i_n_e_n_o Start
              up at _l_i_n_e_n_o.

       ++cc     Make search case sensitive.  By default,  they  are
              not.

       ++dd     This  switch  should  only  be used if you want the
              option to delete a file  while  viewing  it.   This



                            1 May 1995                          2





MOST(1)                                                   MOST(1)


              makes  it  easier  to clean unwanted files out of a
              directory.  The file is deleted with  the  interac-
              tive  key  sequence  `::DD'  and then confirming with
              `yy'.

       ++//_s_t_r_i_n_g
              Start up at the line containing  the  first  occur-
              rence of _s_t_r_i_n_g.

CCOOMMMMAANNDD UUSSAAGGEE
       The  commands take effect immediately; it is not necessary
       to type a carriage return.

       In the following commands, _i is a numerical argument (1 by
       default).

       SSPPAACCEE, CCTTRRLL--DD, NNEEXXTT__SSCCRREEEENN
              Display  another windowful, or jump _i windowfuls if
              _i is specified.

       RREETTUURRNN, DDOOWWNN__AARRRROOWW, VV, CCTTRRLL--NN
              Display another line, or _i more  lines,  if  speci-
              fied.

       UUPP__AARRRROOWW, ^^, CCTTRRLL--PP
              Display  previous  line,  or  _i  previous lines, if
              specified.

       TT, EESSCCAAPPEE<
              Move to top of buffer.

       BB, EESSCCAAPPEE>
              Move to bottom of buffer.

       RRIIGGHHTT__AARRRROOWW, TTAABB, >>
              Scroll window left 60_i columns to view  lines  that
              are beyond the right margin of the window.

       LLEEFFTT__AARRRROOWW, CCTTRRLL--BB, <<
              Scroll  window right 60_i columns to view lines that
              are beyond the left margin of the window.

       UU, CCTTRRLL--UU, DDEELLEETTEE, PPRREEVV__SSCCRREEEENN
              Skip back _i windowfuls and then print a  windowful.

       RR, CCTTRRLL--RR
              Redraw the window.

       JJ, GG   If  _i is not specified, then prompt for a line num-
              ber then jump to that line otherwise just  jump  to
              line _i.

       %%      If  _i  is  not specified, then prompt for a percent
              number then  jump  to  that  percent  of  the  file



                            1 May 1995                          3





MOST(1)                                                   MOST(1)


              otherwise just jump to _i percent of the file.

       WW, ww   If  the current screen width is 80, make it 132 and
              vice-versa.  For  other  values,  this  command  is
              ignored.

       QQ, CCTTRRLL--XX CCTTRRLL--CC, CCTTRRLL--KK EE
              Exit from _m_o_s_t.  On VMS, ^Z also exits.

       hh, CCTTRRLL--HH, HHEELLPP, PPFF22
              Help.  Give a description of all the _m_o_s_t commands.
              The _m_o_s_t environment variable MMOOSSTT__HHEELLPP must be set
              for this to be meaningful.

       ff, //, CCTTRRLL--FF, FFIINNDD, GGOOLLDD PPFF33
              Prompt  for  a  string  and search forward from the
              current line for _ith distinct line  containing  the
              string.  CCTTRRLL--GG aborts.

       ??      Prompt for a string and search backward for the _ith
              distinct  line  containing  the   string.    CCTTRRLL--GG
              aborts.

       nn      Search  for  the  next _i lines containing an occur-
              rence of the last search string in the direction of
              the previous search.

       mm, SSEELLEECCTT, CCTTRRLL--@@, CCTTRRLL--KK MM, PPEERRIIOODD
              Set a mark on the current line for later reference.

       IINNSSEERRTT__HHEERREE,, CCTTRRLL--XX CCTTRRLL--XX,, CCOOMMMMAA,, CCTTRRLL--KK RREETTUURRNN,, GGOOLLDD
              PPEERRIIOODD
              Set a mark on the current line but return to previ-
              ous mark.  This allows the user to toggle back  and
              forth between two positions in the file.

       ll, LL   Toggle  locking  for  this  window.   The window is
              locked if there is a `*' at the left  edge  of  the
              status   line.   Windows  locked  together,  scroll
              together.

       CCTTRRLL--XX 22, CCTTRRLL--WW 22, GGOOLLDD XX
              Split this window in half.

       CCTTRRLL--XX oo, CCTTRRLL--WW oo, oo, GGOOLLDDUP,, GOLDDDOOWWNN
              Move to other window.

       CCTTRRLL--XX 00, CCTTRRLL--WW 00, GGOOLLDD VV
              Delete this window.

       CCTTRRLL--XX 11, CCTTRRLL--WW 11, GGOOLLDD OO
              Delete all other windows, leaving only one  window.

       EE, ee   Edit  this  file.   This  does not spawn an editor,



                            1 May 1995                          4





MOST(1)                                                   MOST(1)


              rather _m_o_s_t uses callable EDT and TPU  routines  to
              perform  the  editing  task.  In addition, _m_o_s_t can
              attach to a kept editor.  See the above  discussion
              of the environment variable MMOOSSTT__EEDDIITTOORR.

       $$, EESSCC $$
              This is system dependent.  On VMS, this causes _m_o_s_t
              to spawn a subprocess.  When  the  user  exits  the
              process,  _m_o_s_t  is  resumed.  On UNIX systems, _m_o_s_t
              simply suspends itself.

       ::nn     Skip to the next  filename  given  in  the  command
              line.   Use  the  arrow  keys  to scroll forward or
              backward through the file list.  `QQ' quits _m_o_s_t and
              any other key selects the given file.

       ::cc     Toggle case sensitive search.

       ::DD     Delete current file.  This command is only meaning-
              ful with the ++dd switch.

       ::oo, ::OO Toggle various options.  With  this  key  sequence,
              _m_o_s_t  displays  a prompt asking the user to hit one
              of: bbddttvvww.  The `bb', `tt', `vv', and `ww' options have
              the same meaning as the command line switches.  For
              example, the `ww' option will toggle wrapping on and
              off for the current window.

              The  `dd'  option must be used with a prefix integer
              _i.  All lines indented beyond _i columns will not be
              displayed.  For example, consider the fragment:

                   int main(int argc, char **argv)
                   {
                        int i;

                        for (i = 0; i < argc, i++)
                        {
                             fprintf(stdout,"%i: %s\n",i,argv[i]);
                        }
                        return 0;
                   }

              The  key sequence `11::oodd' will cause _m_o_s_t to display
              the file ignoring all  lines  indented  beyond  the
              first column.  So for the example above, _m_o_s_t would
              display:

                   int main(int argc, char **argv)...
                   }

              where the `...' indicates lines follow are not dis-
              played.




                            1 May 1995                          5





MOST(1)                                                   MOST(1)


HHIINNTTSS
       CCTTRRLL--GG  aborts  the  commands  requiring  the user to type
       something in at a prompt.  The backquote key has a special
       meaning  here.   It  is  used to quote certain characters.
       This is useful when search for the occurrence of a  string
       with a control character or a string at the beginning of a
       line.  In the latter case, to find the occurrence of `The'
       at  the  beginning  of a line, enter ``^^JJTThhee where `` quotes
       the CCTTRRLL--JJ.

EENNVVIIRROONNMMEENNTT
       _m_o_s_t uses the following environment variables:

       MMOOSSTT__SSWWIITTCCHHEESS
              This variable sets  commonly  used  switches.   For
              example, some people prefer to use _m_o_s_t with the --ss
              option so that excess  blank  lines  are  not  dis-
              played.   On  VMS this is normally done done in the
              login.com through the line:

                   $ define MOST_SWITCHES "-s"

       MMOOSSTT__EEDDIITTOORR (VMS only)
              Set this logical to one of three values: EDT,  TPU,
              or EMACS.  The default is EDT.  _m_o_s_t does not spawn
              an editor.  Rather, it uses callable EDT and TPU to
              perform  the editing task.  Since VMS does not sup-
              port callable EMACS, _m_o_s_t will attempt to attach to
              a  kept  EMACS.   For this case, _m_o_s_t looks for the
              logical name EMACS_PID and attaches to the  process
              with  that  pid.   It  then  defines  the  logicals
              EMACS_FILE_NAME and EMACS_FILE_LINE which EMACS can
              check upon attaching to it.

       MMOOSSTT__HHEELLPP
              This  variable  must  be setup to point to the _m_o_s_t
              helpfile.  Without this _m_o_s_t will not  be  able  to
              provide online help.  However, this behavior may be
              changed at compile time.  See the Makefile for more
              information.

BBUUGGSS
       Almost  all  of  the known bugs or limitations of _m_o_s_t are
       due to a desire to read and interpret  control  characters
       in files.  One problem concerns the use of backspace char-
       acters to underscore or overstrike other characters.  _m_o_s_t
       makes an attempt to use terminal escape sequences to simu-
       late this behavior.  One side effect is the one  does  not
       always  get what one expects when scrolling right and left
       through a file.  When in doubt, use the --vv and --bb  options
       of _m_o_s_t.

       String may not work properly with binary files.




                            1 May 1995                          6





MOST(1)                                                   MOST(1)


AAUUTTHHOORR
       John E. Davis
       davis@space.mit.edu

AACCKKNNOOWWLLEEDDGGEEMMEENNTTSS
       I  would like to thank the users of _m_o_s_t for valuable com-
       ments and criticisms.  I would especially  like  to  thank
       those individuals who have contributed code to _m_o_s_t:

       Mats Akerberg, Henk D. Davids, Rex O. Livingston, and Mark
       Pizzolato.

       I am grateful to Robert Mills <robert@jna.com.au> for  re-
       writing the search routines to use regular expressions.

       Sven  Oliver  Moll <smol0075@rz.uni-hildesheim.de> came up
       with the idea of automatic detection of zipped files.

       I would also like to thank Shinichi Hama for his  valuable
       criticisms of _m_o_s_t_.

       Thanks  to David W. Sanderson (dws@cs.wisc.edu) for adapt-
       ing the documentation to nroff man page source format.


































                            1 May 1995                          7