NAME

- intro - introduction to commands and application programs

DESCRIPTION

- This section describes, in alphabetical order, commands available for GNO. Certain distinctions of purpose are made in the headings. For example, BUILT-IN UTILITIES are those commands which are part of the GNO shell and not contained in stand-alone files.

Manual Page Command Syntax

- Unless otherwise noted, commands described in the SYNOPSIS section of a manual page accept options and other arguments according to the following syntax and should be interpreted as explained below:

  name [- option ...] [ cmdarg ...]

  where:

  [] Surround an option or cmdarg that is not required.

  ... Indicates multiple occurrences of the option or cmdarg.

  name The name of an executable file.

  option

  (Almost always preceded by a "-".)

  noargletter ... or,

  argletter optarg [,...]

  noargletter

  A single letter representing an option without an option-argument. Note that more than one noargletter option can be grouped after one "-".

  argletter

  A single letter representing an option requiring an option-argument.

  optarg An option-argument (character string) satisfying a preceding argletter. Note that groups of optargs following an argletter must be separated by white space and quoted.

  cmdarg

  Path name (or other command argument) not beginning with a "-", or "-" by itself indicating the standard input.

SEE ALSO

GNO Shell User's Manual

NAME

- binprint - dump binary files in ascii/hex format

SYNOPSIS

- binprint [-c columns] [filename]

DESCRIPTION

- binprint takes binary data and formats it as a sequence of ascii data and hex values that represent the binary data. The format of the output is very similar to that produced by the IIGS Monitor and the NiftyList utility.

  Two columns of output are produced. The first column is the hex representation of the data. The second column is the ascii representation of the data. If the particular byte being printed is a non-printable ASCII character, it is printed as a '.'.

  If the -c option is specified, the number following it is used to determine the number of columns (of bytes) per line. The default is 16.

  If the filename is not specified, input is taken from standard input.

BUGS

- binprint is slow.

AUTHOR

- binprint was written by Derek Taubert for GNO/ME.

NAME

- cal - display a calendar

SYNOPSIS

- cal [ [ month ] year ]

DESCRIPTION

- cal displays a calendar for the specified year. If a month is also specified, a calendar for that month only is displayed. If neither is specified, a calendar for the present month is printed.

  year can be between 1 and 9999. Be aware that `cal 78' refers to the early Christian era, not the 20th century. Also, the year is always considered to start in January, even though this is historically naive.

  month is a number between 1 and 12.

  The calendar produced is that for England and her colonies.

  Try September 1752.

NAME

- cat - concatenate and print files

SYNOPSIS

- cat [ -benstuv ] [ file ...]

DESCRIPTION

- The cat utility reads files sequentially, writing them to the standard output. The file operands are processed in command line order. A single dash represents standard input.

  The options are as follows:

  -b Implies the -n option but doesn't number blank lines.

  -e Implies the -v option, and displays a dollar sign ($) at the end of each line as well.

  -n Number the output lines, starting at 1.

  -s Squeeze multiple adjacent empty lines, causing the output to be single spaced.

  -t Implies the -v option, and displays tab characters as [^I] as well.

  -u The -u option guarantees that the output is unbuffered.

  -v Displays non-printing characters so they are visible. Control characters print line [^X] for control-X; the delete character (octal 0177) prints as [^?] Non-ascii characters (with the high bit set) are printed as [M-] (for meta) followed by the character for the low 7 bits.

  The cat utility exits 0 on success, and >0 if an error occurs.

BUGS

- Because of the shell language mechanism used to perform output redirection, the command "cat file1 file 2 > file1" will cause the original data in file1 to be destroyed! Use "cat file2 >> file1" instead.

SEE ALSO

- head(1), more(1), tail(1), Rob Pike "UNIX Style, or cat -v Considered Harmful", "USENIX Summer Conference Proceedings" (1983)

HISTORY

- A cat command appeared in Version 6 AT&T UNIX.

NAME

center - Center text on terminal

SYNOPSIS

center [columns] [file]

DESCRIPTION

Center is used to center lines of text either fed from stdin, or from the specified file.

One may pipe input in to it from the command line, or launch it by itself.

The commands are as follows:

- columns How many columns should be considered when centering the text.

  Defaults to 80 columns.

  file Specifies the file to open for centering. Defaults to stdin.

FILES

center

AUTHOR

- Written by Marek Pawlowski. Source code in Public Domain. Contact author for redistribution rights, or inclusion in a software package. Munge at will. Credit to Marek Pawlowski must be retained in modified source code. Preview of modifications appreciated. Contact Marek Pawlowski at marekp@pnet91.cts.com, marekp@cerf.net.

NAME

- chmod - Modify file permission flags.
- SYNOPSIS
- chmod [vV] [octnum]|[+-=][rwdnbi] file...

DESCRIPTION

- chmod is a program which modifies the permission flags of a series of files. It will modify the read, write, destroy, rename, backup, and invisible flags of the files selected.

OPTIONS

- -v verbose. Provides debugging information.

  -V version. Prints out the version number.

USAGE

- - remove a permission flag.

  + add a permission flag.

  = add permission flag, and clear all other flags.

PERMISSIONS

- r read permssion.

  w write permission.

  d destroy permission.

  n rename permission.

  b backup needed flag.

  i invisible flag.

EXAMPLES

- `Lock' a file: % chmod -wdn foo

  `Unlock' a file: % chmod +wdn foo

BUGS

- Currently octal mode is only guarenteed to work with the ProDOS filesystem, as the chmod() call supplied with Orca/C doesn't seem to work well with other FSTs. Many of the standard Unix permission flags are not implemented, as the ProDOS filesystem does not support these permissions. Among unsupported permissions are seperate sets of flags for user, group, and world. As well, the -x flag is not supported - if you wish to create an executable shell script, use chtyp instead.

SEE ALSO

- ls(1), chtyp(1)

AUTHOR

- James Brookes

  bb252@cleveland.freenet.edu

  jamesb@cscihp.ecst.csuchico.edu

NAME

- chtyp - change file and aux types

SYNOPSIS

- chtyp { [-t filetype] [-a auxtype] } | { -l lang } file...

DESCRIPTION

- chtyp is used to change the file types and aux types of the specified file(s).

  type is one of:

  a decimal number [66]

  a hexidecimal number preceeded by a $ [$42]

  an official Apple mnemonic [FTD]

  and auxtype is either:

  a decimal number [64222]

  a hexidecimal number preceeded by a $ [$FADE]

  lang is one of:

  CC ORCA/C

  ASM65816 ORCA/M or APW Assembler

  IBASIC ORCA/Integer Basic

  LINK ZapLink

  APWC APW C

  PASCAL ORCA/Pascal

  REZ Apple Resource Tool

  EXEC Shell Script file

  TMLPASCAL TML Pascal

  If the -l is used, the -t and -a options cannot be used.

ERRORS

- If chtyp is interrupted with a signal (SIGINT, SIGTERM, etc.) the program aborts with a message telling what signal caused the termination.

  If some other error occurs, chtyp aborts with an error message.

BUGS

- Note that when giving hexadecimal arguments to chtyp, you must quote any '$' characters with a \. For example,

  chtyp -t \$50 -a \$8002 teach.file

Additional language stamps can only be added by modifying the source code.

AUTHOR

Original version by Greg Thompson.

NAME

- cmp - perform a byte-by-byte comparison of two files

SYNOPSIS

- cmp [ -ls ] filename1 filename2 [ skip1 ] [ skip2 ]

DESCRIPTION

- cmp compares filename1 and filename2 . If filename1 is `-', the standard input is used. With no options, cmp makes no comment if the files are the same; if they differ, it reports the byte and line number at which the difference occurred, or, that one file is an initial subsequence of the other.

  skip1 and skip2 are initial byte offsets into filename1 and filename2 respectively, and may be either octal or decimal; a leading 0 denotes octal.

OPTIONS

- -l Print the byte number (in decimal) and the differing bytes (in octal) for all differences between the two files.

  -s Silent. Print nothing for differing files; set exit codes only.

SEE ALSO

- diff(1)

DIAGNOSTICS

- Exit code 0 is returned for identical files, 1 for different files, and 2 for an inaccessible or missing argument, or a system error.

NAME

- compress, uncompress, zcat - compress and expand data

SYNOPSIS

- compress [-cCdDf?hkKvV][-b maxbits][-Iinpath][-Ooutpath][filenames...]

  uncompress [-fCcvVkK?h][-Iinpath][-Ooutpath][filenames...]

  zcat [-CvV?h][-Iinpath][-Ooutpath][filenames...]

  -V print Version

  -d decompress input (default is compress)

  -v verbose

  -f force overwrite of output file (default = off)

  -n no header: useful to uncompress old files

  -c write all output to stdout (default = off)

  -C generate output compatible with compress 2.0

  -k %s input file (default = keep)

  -K %s output file on error (default = kill)

  -b maxbits default = 16 bits

  -I pathname infile path = none

  -O pathname outfile path = none

  -? -h help, print full usage message

DESCRIPTION

- Compress reduces the size of the named files using adaptive Lempel-Ziv coding. Whenever possible, each file is replaced by one with the extension .Z, while keeping the same ownership modes, access and modification times. If no files are specified, the standard input is compressed to the standard output.Compressed files can be restored to their original form using uncompress or zcat.

  The -f option will force compression of name. This is useful for compressing an entire directory, even if some of the files do not actually shrink. If -f is not given and compress is run in the foreground, the user is prompted as to whether an existing file should be overwritten.

  The -c option makes compress/uncompress write to the standard output; no files are changed. The nondestructive behavior of zcat is identical to that of uncompress -c.

  Compress uses the modified Lempel-Ziv algorithm popularized in "A Technique for High Performance Data Compression", Terry A. Welch, "IEEE Computer," vol. 17, no. 6 (June 1984), pp. 8-19. Common substrings in the file are first replaced by 9-bit codes 257 and up. When code 512 is reached, the algorithm switches to 10-bit codes and continues to use more bits until the limit specified by the -b flag is reached (default 16). Bits must be between 9 and 16. The default can be changed in the source to allow compress to be run on a smaller machine.

  After the bits limit is attained, compress periodically checks the compression ratio. If it is increasing, compress continues to use the existing code dictionary. However, if the compression ratio decreases, compress discards the table of substrings and rebuilds it from scratch. This allows the algorithm to adapt to the next "block" of the file.

  Note that the -b flag is omitted for uncompress, since the bits parameter specified during compression is encoded within the output, along with a magic number to ensure that neither decompression of random data nor recompression of compressed data is attempted.

  The amount of compression obtained depends on the size of the input, the number of bits per code, and the distribution of common substrings. Typically, text such as source code or English is reduced by 50-60%. Compression is generally much faster compressing, but the output is not as small as freeze.

  Under the -v option, a message is printed yielding the percentage of reduction for each file compressed.

  If the -V option is specified, the current version and compile options are printed on stderr.

RETURN VALUE

- Exit status is normally 0; if the last file is larger after (attempted) compression, the status is 2; if an error occurs, exit status is 1.

SEE ALSO

- freeze(1)

DIAGNOSTICS

- Usage: compress [\-dfvcV] [\-b maxbits] [file ...]

  Invalid options were specified on the command line.

  Missing maxbits

  Maxbits must follow -b.

  file : not in compressed format

  The file specified to uncompress has not been compressed.

  file : compressed with bits, can only handle yy bits

  File was compressed by a program that could deal with more bits than the compress code on this machine. Recompress the file with smaller bits.

  file : already has .Z suffix -- no change

  The file is assumed to be already compressed. Rename the file and try again.

  file : filename too long to tack on .Z

  The file cannot be compressed because its name is longer than 12 characters. Rename and try again. This message does not occur on BSD systems.

  file already exists; do you wish to overwrite (y or n)?

  Respond "y" if you want the output file to be replaced; "n" if not.

  Compression: "xx.xx%"

  Percentage of the input saved by compression. (Relevant only for -v.)

  -- not a regular file: unchanged

  When the input file is not a regular file,(e.g. a directory), it is left unaltered.

  -- file unchanged

  No savings is achieved by compression. The input remains virgin.

BUGS

- Although compressed files are compatible between machines with large memory, -b 12 should be used for file transfer to architectures with a small process data space (64KB or less, as exhibited by the DEC PDP series, the Intel 80286, etc.)

NAME

- conv - convert file formats

SYNOPSIS

- conv -convspec file1 ...

DESCRIPTION

- conv converts files between various formats. convspec is a specification detailing the type of file1 and the type to convert it to.

  -crlf convert line terminators from CR (Apple) to LF (Unix).

  -lfcr convert line terminators from LF (Unix) to CR (Apple).

  -detab spacing translate tabs to spaces, using tabs every spacing characters. A smart algorithm is used which only inserts enough spaces to move to the next tab stop. spacing is an integer less than 20.

  -0001 converts all 0x00 bytes to 0x01 for using Macintosh sound files on the IIgs.

NOTES

- conv is very quick on all the conversions except -detab (speed approaches 30K/sec). conv works under the Orca shell also, and supports the Orca method of wildcards. Look at the code to see how nasty this makes programs.

SEE ALSO

- cat(1), more(1), tr(1)

AUTHOR

- conv was written by Greg Thompson for GNO/ME.

NAME

- du - Display disk usage statistics

SYNOPSIS

- du [ -aksx ] pathname ...

DESCRIPTION

- The du utility displays the block usage of files in the current directory or for the entire tree of a given pathname.

  The options are as follows:

  -a Generate an entry for each file.

  -k By default, du displays the number of blocks as returned by the stat(2) system call, i.e. 512-byte blocks. If the -k flag is specified, the number displayed is the number of 1024-byte blocks with partial blocks rounded up.

  -s Generate only the grand total. If neither -a or -s are specified, an entry is generated for each directory only.

  -x Don't traverse any mount points.

  Files having multiple hard links are counted (and displayed) a single time per du execution.

SEE ALSO

- df(1)

BUGS

- The Apple IIGS does not have the concept of mount points, and thus the -x option is useless.

HISTORY

- A du command appeared in Version 6 AT&T Unix.

NAME

- eps - display extended process status information.

SYNOPSIS

- eps [-anlw] [-t tty] [-u user]

DESCRIPTION

- eps is an extended ps command which displays more information than the gsh builtin ps.

USAGE

- -a Show all processes; normally eps limits the processes displayed to those that are owned by the current user.

  -n Show username instead of userID, which is default.

  -l Long list. This includes PPID (parent's PID), MMID (Memory Manager ID) and a longer time field.

  -w Wider list. A single w results in a 132 column wide listing, and two results in the whole command line being displayed. Normally the command line will be truncated to either 80 (default) or 132 (-w) columns.

  -t tty Display only those processes that are owned by tty.

  -u user Display only those processes that are owned by user.

SEE ALSO

- GNO Shell Reference Manual, parent(1)

AUTHOR

- James Brookes

  bb252@cleveland.freenet.edu

  jamesb@cscihp.ecst.csuchico.edu

NAME

- fold - fold long lines for finite width output device

SYNOPSIS

- fold [ -w width ]

DESCRIPTION

- Fold is a filter which folds the contents of the specified files, or the standard input if no files are specified, breaking the lines to have maximum of 80 characters.

  The options are as follows:

  -w width

  Specifies a line width to use instead of the default 80 characters.Width should be a multiple of 8 if tabs are present, or the tabs should be expanded using conv(1) before using fold .

SEE ALSO

- conv(1)

BUGS

- If underlining is present it may be messed up by folding.

NAME

- getvers,setvers - manipulate rVersion resources in executable files

SYNOPSIS

- getvers filename

  setvers file ' string1 ~ string2 ' [ country ] v majrev.minrev.bugrev

DESCRIPTION

- getvers accepts as input the name of an executable file, and prints the version information stored in the rVersion resource of the file. If no rVersion resource is present it will abort with the error `This file has no rVersion resource'.

  To add information to the rVersion resource, setvers is used. The rVersion format allows for two stirngs of up to 255 characters, although it is suggested that for this use you keep each field shorter than 80 characters.

  string1 is separated from string2 by a ~ (tilde) character, and both strings should be enclosed in single quotes. string1 is required to be the name of the program. Any `_' character in string2 will be interpreted as a carriage return. When using GNO, make sure to quote the single quotes and the tilde with backslashes.

  The optional field country (no spaces allowed) allows you to set the country field of the rVersion resource. The last parameter is the current revision number of the program in the format majrev . minrev . bugrev, where

  majrev is a single or double digit number from 00 to 99, and minrev and bugrev are single digit numbers from zero to nine.

COUNTRIES

- Valid Countries/Regions (case IS sensitive)

  Arabia Iceland

  Australia Israel

  Belgium/Luxembourg Italy

  Bosnia/Herzegovena Japan

  Britian Korea

  China Malta

  Cyprus Netherlands

  Denmark Norway

  Finland Portugal

  France Spain

  FrenchCanadian Sweden

  FrenchSwiss Taiwan

  GermanSwiss Thailand

  Germany Turkey

  Greece UnitedStates

EXAMPLES

- Set the version of program `chmod' to read:

  chmod v01.0.0

  James Brookes

  jamesb@cscihp.ecst.csuchico.edu

  Country: United States

  in Orca:

  # setvers chmod 'chmod~James Brookes_jamesb@cscihp.ecst.csuchico.edu' v01.0.0

  in GNO:

  % setvers chmod \'chmod\\~James Brookes_jamesb@cscihp.ecst.csuchico.edu\' v01.0.0

CAVEATS

- If an rVersion resource already exists, it will be overwritten and replaced with the new one. Other resources will be unaffected.

BUGS

- Little crawly things, also known as insects.

AUTHOR

- Ian Schmidt - Two Meg Software (irsman@iastate.edu)

NAME

- grep, egrep, fgrep - search a file for a string or regular expression

SYNOPSIS

- grep [ -bchilnsvw ] [ -e expression ] [ filename ... ]

  egrep [ -bchilnsv ] [ -e expression ] [ -f filename ] [ expression ] [ filename ... ]

  fgrep [ -bchilnsvx ] [ -e string ] [ -f filename ] [ string ] [ filename ... ]

DESCRIPTION

- Commands of the grep family search the input filenames (the standard input default) for lines matching a pattern. Normally, each line found is copied to the standard output. grep patterns are limited regular expresions in the style of ed(1). egrep patterns are full regular expressions including alternation. fgrep patterns are fixed strings - no regular expression metacharacters are supported, and as a result fgrep is generally an order of magnitude faster than the other versions of grep.

  Take care when using the characters `$', `*', [, `^', `|', `(', `)', and `\' in the expression, as these characters are also meaningful to the shell. It is safest to enclose the entire expression argument in single quotes `...'

  When any of the grep utilities is applied to more than one input file, the name of the file is displayed preceding each line which matches the pattern. The filename is not displayed when processing a single file, so if you actually want the filename to appear, use .null as a second file in the list.

OPTIONS

- -b Precede each line by the block number on which it was found. This is sometimes useful in locating disk block numbers by context.

  -c Display a count of matching lines rather than displaying the lines which match.

  -h Do not display filenames.

  -i Ignore the case of letters in making comparisons - that is, upper and lower case are considered identical.

  -l List only the names of files with matching lines (once) separated by NEWLINE characters.

  -n Precede each line by its relative line number in the file.

  -s Work silently, that is, display nothing except error messages. This is useful for checking the error status.

  -v Invert the search to only display lines that do not match.

  -w Search for the expression as a word as if surrounded by \< and \>. This applies to grep only.

  -x Display only those lines which match exactly - that is, only lines which match in their entirety. This applies to fgrep only.

  -e expression

  Same as a simple expression argument, but useful when the expression begins with a `-'.

  -e string

  For fgrep the argument is a literal character string .

  -f filename

  Take the regular expression (egrep) or a list of strings separated by NEWLINE (fgrep) from filename .

REGULAR EXPRESSIONS

- The following one-character regular expressions match a single character:

  c An ordinary character ( not one of the special characters discussed below) is a one-character regular expression that matches that character.

  \ c A backslash (\) followed by any special character is a one-character regular expression that matches the special character itself. The special characters are:

  • `.', `*', `[', and `\' (period, asterisk, left square bracket, and backslash, respectively), which are always special, except when they appear within square brackets ([]).

  • `^' (caret or circumflex), which is special at the beginning of an entire regular expression, or when it immediately follows the left of a pair of square brackets ([]).

  • $ (currency symbol), which is special at the end of an entire regular expression.

  A backslash followed by one of `<', `>', `(', `)', `{', or `}', represents a special operator in the regular expression; see below.

  . A `.' (period) is a one-character regular expression that matches any character except NEWLINE.

  [ string ]

  A non-empty string of characters enclosed in square brackets is a one-character regular expression that matches any one character in that string. If, however, the first character of the string is a `^' (a circumflex or caret), the one-character regular expression matches any character except NEWLINE and the remaining characters in the string. The `^' has this special meaning only if it occurs first in the string. The `-' (minus) may be used to indicate a range of consecutive ASCII characters; for example, [0-9] is equivalent to [0123456789]. The `-' loses this special meaning if it occurs first (after an initial `^', if any) or last in the string. The `]' (right square bracket) does not terminate such a string when it is the first character within it (after an initial `^', if any); that is, []a-f] matches either `]' (a right square bracket ) or one of the letters a through f inclusive. The four characters `.', `*', `[', and `\' stand for themselves within such a string of characters.

  The following rules may be used to construct regular expressions:

  * A one-character regular expression followed by `*' (an asterisk) is a regular expression that matches zero or more occurrences of the one-character regular expression. If there is any choice, the longest leftmost string that permits a match is chosen.

  \(and\)

  A regular expression enclosed between the character sequences \( and \) matches whatever the unadorned regular expression matches. This applies only to grep.

  \ n The expression \ n matches the same string of characters as was matched by an expression enclosed between \( and \) earlier in the same regular expression. Here n is a digit; the sub-expression specified is that beginning with the n th occurrence of \( counting from the left. For example, the expression ^\(.*\)\1$ matches a line consisting of two repeated appearances of the same string.

  Concatenation

  The concatenation of regular expressions is a regular expression that matches the concatenation of the strings matched by each component of the regular expression.

  \< The sequence \< in a regular expression constrains the one-character regular expression immediately following it only to match something at the beginning of a word; that is, either at the beginning of a line, or just before a letter, digit, or underline and after a character not one of these.

  \> The sequence \> in a regular expression constrains the one-character regular expression immediately following it only to match something at the end of a word; that is, either at the end of a line, or just before a character which is neither a letter, digit, nor underline.

  \{ m \}

  \{ m ,\}

  \{ m , n \}

  A regular expression followed by \{ m \}, \{ m , \ }, or \{ m , n \} matches a range of occurrences of the regular expression. The values of m and n must be non-negative integers less than 256; \{ m \} matches exactly m occurrences; \{ m ,\} matches at least m occurrences; \{ m , n \} matches any number of occurrences between m and n inclusive. Whenever a choice exists, the regular expression matches as many occurrences as possible.

  ^ A circumflex or caret (^) at the beginning of an entire regular expression constrains that regular expression to match an initial segment of a line.

  $ A currency symbol ($) at the end of an entire regular expression constrains that regular expression to match a final segment of a line.

  The construction

  example% ^ entire regular expression $

  constrains the entire regular expression to match the entire line.

  egrep accepts regular expressions of the same sort grep does, except for \(, \), \ n, \<, \>, \{, and \}, with the addition of:

  * A regular expression (not just a one-character regular expression) followed by `*' (an asterisk) is a regular expression that matches zero or more occurrences of the one-character regular expression. If there is any choice, the longest leftmost string that permits a match is chosen.

  + A regular expression followed by `+' (a plus sign) is a regular expression that matches one or more occurrences of the one-character regular expression. If there is any choice, the longest leftmost string that permits a match is chosen.

  ? A regular expression followed by `?' (a question mark) is a regular expression that matches zero or one occurrences of the one-character regular expression. If there is any choice, the longest leftmost string that permits a match is chosen.

  | Alternation: two regular expressions separated by `|' or NEWLINE match either a match for the first or a match for the second.

  () A regular expression enclosed in parentheses matches a match for the regular expression.

  The order of precedence of operators at the same parenthesis level is `[ ]' (character classes), then `*' `+' `?' (closures),then concatenation, then `|' (alternation) and NEWLINE.

EXAMPLES

- Search a file for a fixed string using fgrep:

  example% fgrep intro /usr/share/man/man3/*.3*

  Look for character classes using grep:

  example% grep '[1-8]([CJMSNX])' /usr/share/man/man1/*.1

  Look for alternative patterns using egrep:

  example% egrep '(Sally|Fred) (Smith|Jones|Parker)' telephone.list

  To get the filename displayed when only processing a single file, use .null as the second file in the list:

  example% grep 'Sally Parker' telephone.list /dev/null

FILES

.null

SEE ALSO

awk(1), gsh(1), vi(1), sed(1)

BUGS

Lines are limited to 1024 characters by grep; longer lines are truncated.

- The combination of -l and -v options does not produce a list of files in which a regular expression is not found. To get such a list, use the C shell construct (Note: this is NOT the same as gsh, which does not support such programming).

  foreach filename (*)

  if (`grep " re " $ filename | wc -l` == 0) echo $ filename

  end

  Ideally there should be only one grep.

DIAGNOSTICS

- Exit status is 0 if any matches are found, 1 if none, 2 for syntax errors or inaccessible files.

NAME

- head - give first few lines

SYNOPSIS

- head [-count] [file ...]

DESCRIPTION

- This filter gives the first count lines of each of the specified files, or of the standard input. If count is omitted it defaults to 10.

SEE ALSO

- tail(1)

HISTORY

- head appeared in 3 BSD.

NAME

- ls - list contents of directory

SYNOPSIS

- ls [ -acdfilqrstu1ACLFR ] name ...

DESCRIPTION

- For each directory argument, ls lists the contents of the directory; for each file argument, ls repeats its name and any other information requested. By default, the output is sorted alphabetically. When no argument is given, the current directory is listed. When several arguments are given, the arguments are first sorted appropriately, but file arguments are processed before directories and their contents.

  There are a large number of options:

  -l List in long format, giving mode, number of links,owner, size in bytes, and time of last modification for each file. If the file is a special file the size field will instead contain the major and minor device numbers. If the file is a symbolic link the pathname of the linked-to file is printed preceded by ``->''.

  -t Sort by time modified (latest first) instead of by name.

  -a List all entries; in the absence of this option, entries whose names begin with a period (.) or whose GS/OS 'invisible' flag is set are not listed.

  -A List all entries except for the current directory (.) and the parent directory (..).

  -s Give size in kilobytes of each file.

  -d If argument is a directory, list only its name; often used with -l to get the status of a directory.

  -L If argument is a symbolic link, list the file or directory the link references rather than the link itself. Note that if the link references a directory the link is always followed, unless the -l option is used.

  -r Reverse the order of sort to get reverse alphabetic or oldest first as appropriate.

  -u Use time of last access instead of last modification for sorting (with the -t option) and/or printing (with the -l option).

  -c Use time of file creation for sorting or printing.

  -i For each file, print the i-number in the first column of the report.

  -f Force each argument to be interpreted as a directory and list the name found in each slot. This option turns off -l, -t, -s, and -r, and turns on -a; the order is the order in which entries appear in the directory.

  -F Cause directories to be marked with a trailing `/', sockets with a trailing `=', executable files with a trailing `*', and symbolic links to files with a trailing `@'. Symbolic links to directories are marked with a trailing `/', unless the -l option is also used.

  -R recursively list subdirectories encountered.

  -1 force one entry per line output format; this is the default when output is not to a terminal.

  -C force multi-column output; this is the default when output is to a terminal.

  -q force printing of non-graphic characters in file names as the character `?'; this is the default when output is to a terminal.

  -n Causes ls to not sort files; this is useful when organizing libraries in alphabetical order for ORCA languages.

  The mode printed under the -l option contains 11 characters which are interpreted as follows: the first character is

  e if the entry has a resource fork,

  d if the entry is a directory;

  b if the entry is a block-type special file;

  c if the entry is a character-type special file;

  l if the entry is a symbolic link;

  s if the entry is a socket, or

  - if the entry is a plain file.

  The next 9 characters are interpreted as three sets of three bits each. The first set refers to owner permissions; the next refers to permissions to others in the same user-group; and the last to all others. Within each set the three characters indicate permission respectively to read, to write, or to execute the file as a program. For a directory, `execute' permission is interpreted to mean permission to search the directory. The permissions are indicated as follows:

  i if the file is invisible

  d if the file can be deleted

  r if the file is readable;

  w if the file is writable;

  x if the file is executable;

  - if the indicated permission is not granted.

  The group-execute permission character is given as s if the file has the set-group-id bit set; likewise the user-execute permission character is given as s if the file has the set-user-id bit set.

  When the sizes of the files in a directory are listed, a total count of blocks, including indirect blocks is printed.

BUGS

- The output device is assumed to be 80 columns wide.

  GNO and GS/OS do not currently support links, user/group permissions, the concept of 'i-numbers', or 'special' files; thus, ls options that deal with these are ignored.

NAME

- lseg - list segments in an OMF file

SYNOPSIS

- lseg file

DESCRIPTION

- lseg lists the segments of an OMF executable file. While it can list the segments in an intermediate object file, the information isn't as useful.

  lseg is intended for discovering the location of stack segments in existing applications (for editing to smaller sizes), as an aid in determining how to segment large C files whose segments exceed the bank size, and for deciding which segments to recombine after excessive segmentation.

AUTHOR

- Jawaid Bazyar for GNO/ME.

BUGS

- Doesn't detect non-OMF files, and thus can get very confused if you do "lseg *" and one of the files chosen isn't an OMF file. Usually the only way to terminate is to interrupt the program with ^C.

NAME

- make - build a program according to a program definition file

SYNOPSIS

- make [-d] [-p] [-s] inputFile

DESCRIPTION

- make is a program maintenance utility that aids in creating programs from multiple source files.

  inputFile is the name of the Program Description File. If absent, make defaults to using 'makefile' as the PDF. make's options are as follows:

  -d Display the modification date and time as each file is checked.

  -p Operate in programmer/debug mode.

  -s Operate in silent mode.

  The logical definition of each of the PDF parameters follows:

  # Comments begin with a pound sign "#".

  #

  TargetFile: DependentFile1 \ #

  DependentFile2 DependentFilen

  ShellCommand1

  ShellCommand2

  .

  .

  ShellCommandn

MAKE PARAMETERS

- Comments can be placed anywhere in the PDF file. If a pound sign is in column one, the entire line is treated as a comment. Anything following the pound is ignored by make. Comments may also be placed on parameter lines containing Target/Dependent file parameters.

  The TargetFile parameter must start in column one and ends with a colon ":". It can be a full path name, partial path name or file in the current directory. This file is usually an object type file created by a compiler. Dependent file parameter(s) follow the semicolon and are separated by a space, a comma or both. Dependent file parameters are usually CC, PAS, ASM or some type of included SRC file. Essentially, TargetFile is the result of compiling the dependent source files.

  make obtains the modfication date and time of the Target file and then compares it to each of the dependent file(s) moving left to right. If one of the dependent files has a date and time later than the Target file, the subsequent ShellCommands are executed. Target/Dependent parameters may be continued by placing a reverse slash "\" on the line following a dependent file parameter. make will interpret the next line as dependent file parameters which may also be continued and so on. There should not be any blank lines between the continued line and next line.

  ShellCommands must contain a space in column one to differentiate them from Target/Dependent file parameters. If make determines that a Target file needs to be recreated, the ShellCommands following the Target/Dependent file parameters are passed, as is, to the shell interpreter. The commands must be valid shell commands. ShellCommands are executed until a blank line is encountered or an error occurs during the execution of the last command. If an error occurs, make terminates without reading the remaining PDF parameters. If a blank line is read, make returns to Target/Dependent search mode.

  MAKE Example

  #

  # File: Example.Make - A MAKE example PDF #

  Menu.Root: Menu.CC # Contains menu related routines

  compile menu.cc keep=menu

  Window.Root: Window.CC # Contains window handling routines

  compile window.cc keep=window

  Misc.Root: Misc.CC Misc.h # Contains miscellaneous program routines

  compile misc.cc keep=misc

  Main.Root: Main.CC Include/Main.h Include/Misc.h # Main program

  compile main.cc keep=main

  MyProg: Menu.Root Window.Root Misc.Root \ # re-link required?

  Main.Root # check all dependent files

  link main misc menu window keep=myprog # Shell comment

  chtyp -t s16 myprog # change type to S16

  # End of PDF

  The example PDF shows a program that is made up of 4 source files. The Main and Misc routines are also dependent on include files containing information that if changed would force a re-compile of that module.

  One thing to keep in mind is the order of Target/Dependent parameters can be important. make examines the PDF from the top down. If a file is modified due to a command later in the PDF, make will not return to a previous Target/Dependent parameter in which that file was a dependent file.

AUTHOR

- Original make util written by Larry Agle for ORCA; modifications made to make it look more like UNIX make, and misc. Bug fixes by Jawaid Bazyar.

NAME

- makemake - scan C source files for dependencies and create a makefile

SYNOPSIS

- makemake source.c

DESCRIPTION

- makemake takes the C source file(s) as input, and scans them for dependencies (#includes). It does not count standard headers (#includes with the filename surrounded by < >).

  The dependency information for all the source files specified is then written to a file 'makefile' in the current directory.

  makemake does not create link scripts nor does it put an executable dependendcy into the file, as these require link information not available from the makemake command line.

AUTHOR

- Jawaid Bazyar for GNO/ME's 'make' utility. He got tired of writing them by hand.
- BUGS
- makemake does not properly handle recursive or multiple includes of the same file. If the same file is included more than once, makemake will list it that many times in the output makefile. While multiple includes don't hurt anything, it can take more time to process the makefile. Recursive includes will, of course, hang makemake.

NAME

- man - online manual system (Version 1.6)

SYNOPSIS

- man [ section ] manpagename

DESCRIPTION

- man is the access point to the online manual system. man works as a shell that calls an appropriate text formatter to format a manual page. There are currently three text formatters available for the GNO/ME system.

  nroff Unix standard typesetting package

  aroff formats AppleWorks GS(tm) documents

  cat used to display preformatted documents

  If the option section argument is specified, man looks specifically in that section of the manual for the manpage. This is needed in situations where there are manpages with the same name in different sections (for example, sleep(1) and sleep(3).

ENVIRONMENT

- man recognizes the following variables from the shell.

  USRMAN

  This variable is required . It points to the manual system root directory.

  PAGER

  man uses more as the default pager. If you wish to use a different pager, less perhaps, then you must set this variable to point to that pager.

Compressed Manual Pages and Links

- If man finds a file in the manual that ends in a '.l' suffix, it takes the contents of that file as a 'link' to the actual manpage. This is useful for manpages that describe multiple commands, and prevents having multiple copies of the manpage.

  Manual pages may be compressed with compress or freeze, in which case the appropriate program is called to uncompress the manual file.

SEE ALSO

- more(1), less(1), compress(1), freeze(1).

NAME

- mkdir - Makes directories

SYNOPSIS

- mkdir dirname ...

DESCRIPTION

- The mkdir command creates subdirectories with the dirnames specified. If a file with that dirname exists, an error is returned. dirname may be a full pathname, or a partial pathname, in which case the directory is created as a subdirectory of the current directory.

  mkdir only creates the filename portion of the specified path. If, for instance, you do

  mkdir /usr/local/bbs/foo

  directory foo will only be created if all of /usr, local, and bbs exist.

AUTHOR

- mkdir was written by James Brookes for GNO/ME.

NAME

- more - text pager

SYNOPSIS

- more [ file ...]

DESCRIPTION

- more allows the user to view the specified file(s) screen by screen or line by line. If no files are specified, standard input is used.

  Every time more has displayed a screen of text, it displays a prompt

  - filename (xx%) -

  indicating the percentage of the file that has been viewed and its filename. If standard input is used,

  ' - more - '

  is used as the prompt instead.

  A number of key commands are available at the prompt.

  q quit viewing the current file, and move to the next file (if any)

  [RETURN]

  display the next line of the file

  [ESC] abort more, including any more files that may have been specified

  [SPACE]

  display the next page of the file

AUTHOR

- This version of more was written by Jawaid Bazyar and Derek Taubert.

NAME

- passwd - set a user's login password

SYNOPSIS

- passwd [ -? | -v ] [ username ]

DESCRIPTION

- passwd changes the specified user's password. Only root is allowed to alter passwords other than his own. If theusername is not given, the user's own login name is assumed. Users other than root must then enter the old password to verify permission to change the password. Finally, the user must type the desired new password twice to insure that no mistakes are made.

  To cancel passwd, type CTRL-@ when asked to enter the new password.

  The -? flag causes passwd to display a brief usage message, and the -v flag causes passwd to display version information.

SEE ALSO

- login(1)

FILES

- /etc/passwd - contains the password information

AUTHOR

- Eric Shepherd

  Internet uerics@mcl.mcl.ucsb

  AOL Sheppy

NAME

- purge - deallocate purgeable memory handles

SYNOPSIS

- purge [-v]

DESCRIPTION

- This program purges all memory blocks marked purgable. This is very important when using the Orca compilers and shells since certain blocks get left lying around and can (and have!) caused compiler errors. By purging memory before compiles a large percentage of strange compiler errors can be eliminated. After purging, all memory possible is then freed for usage.
- -v gives a verbose listing of each handle being purged and before and after free memory statistics.

The problems mentioned above usually occur when a program has over-written one of the ORCA FastFile system's memory handles. Purging clears these handles and forces a reload from disk.

BUGS

- Purging memory when non-shell applications are running could be dangerous.

NAME

- rx, rc, rb, rz - Receive Files and Commands with X/Y/ZMODEM

SYNOPSIS

- rz -tv

  rb -tv

  rc -tv file

  rx -tv file

  gz file ... [-v]

  rzCOMMAND

DESCRIPTION

- This program uses error correcting protocols to receive files over a dial-in serial port from a variety of programs running under many operating systems. It is invoked from a shell prompt manually, or automatically as a result of an "sz file ..." command given to the calling program.

  This is a shareware program copyrighted by Omen Technology INC.

  Rz (Receive ZMODEM) receives one or more files with the ZMODEM protocol. Pathnames are supplied by the sending program, and directories are made if necessary (and possible). Normally, the "rz" command is automatically issued by the calling ZMODEM program, but defective ZMODEM implementations may require starting rz manually.

  Rb receives file(s) with YMODEM, accepting either standard128 byte sectors or 1024 byte sectors (sb -k option). The user should determine when the 1024 byte block length actually improves throughput.

  If True YMODEM™ (Omen Technology trademark) file information (file length, etc.) is received, the file length controls the number of bytes written to the output dataset, and the modify time and file mode (iff non zero) are set accordingly.

  If True YMODEM file information is not received, slashes in the pathname are changed to underscore, and any trailing period in the pathname is eliminated. This conversion is useful for files received from CP/M and other historical systems.

  Rc receives a single file with XMODEM-CRC or XMODEM-1k-CRC protocol. The user should determine when the 1024 byte block length actually improves throughput without causing problems. The user must supply the file name to both sending and receiving programs. Up to 1023 garbage characters may be added to the received file.

  Rx receives a single file with XMODEM or XMODEM-1k protocol. The user should determine when the 1024 byte block length actually improves throughput without causing problems. The user must supply the file name to both sending and receiving programs. Up to 1023 garbage characters may be added to the received file.

  Rz may be invoked as rzCOMMAND (with an optional leading - as generated by login(1)). For each received file, rz will pipe the file to ``COMMAND filename'' where filename is the name of the transmitted file with the file contents as standard input.

  Each file transfer is acknowledged when COMMAND exits with 0 status. A non zero exit status terminates transfers.

  A typical use for this form is rzmail which calls rmail(1) to post mail to the user specified by the transmitted file name. For example, sending the file "caf" from a PC-DOS system to rzmail on a Unix system would result in the contents of the DOS file "caf" being mailed to user "caf".

  The meanings of the available options are:

- tim Change timeout to tim tenths of seconds.

  v Verbose causes a list of file names to be appended to /tmp/rzlog . More v's generate more detailed debugging output.

DIAGNOSTICS

- Exit status is as follows: 0 for successful transfers. 1 if unrecoverable errors are detected. 2 if syntax errors or file access problems are detected. 3 if the program was terminated by a caught interrupt.

SEE ALSO

- sz(1).

NOTES

- ZMODEM's support of XOFF/XON flow control allows proper operation in many environments that do not support XMODEM uploads. Unfortunately, not all Unix versions support input flow control. The TTY input buffering on some systems may not adequately buffer long blocks or streaming input at high speed. You should suspect this problem when you can't send data to the Unix system at high speeds using ZMODEM, YMODEM-1k or XMODEM-1k, but YMODEM with 128 byte blocks works properly.

  If a program that does not properly implement the specified file transfer protocol causes rz to "hang" the port after a failed transfer, either wait for rz to time out or keyboard a dozen Ctrl-X characters.

  Many programs claiming to support YMODEM only support XMODEM with 1k blocks, and they often don't get that quite right.

BUGS

- This version of rz does not support some ZMODEM features.

  The ASCII option's CR/LF to NL translation merely deletes CR's.

ZMODEM CAPABILITIES

- Rz supports ZMODEM command execution (zcommand), incoming ZMODEM binary (-b), ASCII (-a), newer(-n), newer+longer(-N), protect (-p), Crash Recovery(-r), clobber (-y), match+clobber (-Y), compression(-Z), and append (-+) requests. Other options sent by the sender are ignored. The default is protect (-p) and binary (-b).

FILES

- /tmp/rzlog stores debugging output generated with -vv option

NAME

- script - make typescript of a terminal session

SYNOPSIS

- script [ -a ] [ filename ]

DESCRIPTION

- script makes a typescript of everything printed on your terminal. The typescript is written to filename , or appended to filename if the -a option is given. It can be sent to the line printer later with lpr(1). If no file name is given, the typescript is saved in the file typescript .

  The script ends when the forked shell exits.

OPTIONS

- -a Append the script to the specified file instead of writing over it.

SEE ALSO

- lpr (1), pty (4)

BUGS

- script places everything in the log file. This is not what the naive user expects.

NAME

- sleep - suspend execution for an interval

SYNOPSIS

- sleep time

DESCRIPTION

- Sleep suspends execution for time seconds. It is used to execute a command after a certain amount of time as in a script:
- sleep 105

  command

SEE ALSO

- alarm(3C), sleep(3)

BUGS

- Time must be less than 2,147,483,647 seconds.

NAME

- split - split a file into pieces

SYNOPSIS

- split [ - number ] [ infile [ outfile ] ]

DESCRIPTION

- split reads infile and writes it in number -line pieces (default 1000) onto a set of output files (as many files as necessary). The name of the first output file is outfile with aa appended, the second file is outfileab , and so on lexicographically.

  If no outfile is given, x is used as default (output files will be called xaa , xab , etc.).

  If no infile is given, or if `-' is given in its stead, then the standard input file is used.

OPTIONS

- - number Number of lines in each piece.

NAME

- stty - set and view terminal options and parameters

SYNOPSIS

- stty [ option ... ] [ charoption c ... ]

DESCRIPTION

- If no options are specified, stty prints out all the current terminal option settings. options represent boolean flags in the terminal parameters, and are as follows:

  raw turns on RAW mode (no character or line processing)

  -raw turns off RAW mode

  ehco if in CBREAK or COOKED mode, echoes input characters

  -echo echo mode off

  cbreak turns on CBREAK mode (single character processing)

  -cbreak turns off CBREAK mode (line-at-a-time processing)

  Charoptions represent variables in the terminal interface, and are as follows:

  intr c sets the interrupt character (normally ^C)

  start c sets the start character (normally ^Q)

  stop c sets the stop character (normally ^S)

  eof c sets the eof character (normally ^D)

  susp c sets the suspend character (normally ^Z)

  c may be defined either as an octal number such as 003, or in control character format (^C).

SEE ALSO

- tty(4)

NAME

- sum - print checksum and block count of a file

SYNOPSIS

- sum [ file ]

DESCRIPTION

- Sum calculates and prints a 16-bit checksum for the named file, and also prints the number of blocks in the file. Stdin is used if no file names are given. Sum is typically used to look for corrupted files, or to validate a file communicated over some transmission line.

DIAGNOSTICS

- ``Read error'' is indistinguishable from end of file on most devices; check the block count.

SEE ALSO

- wc(1).

NOTE

- Sum is pretty slow on large files when running on the GS. If anyone has a faster algorithm for computing the 16-bit checksum, I'd really appreciate seeing it.

AUTHOR

- Marek Pawlowski - marekp@pnet91.cts.com