diff --git a/asa.1 b/asa.1 new file mode 100755 index 0000000..08b556e --- /dev/null +++ b/asa.1 @@ -0,0 +1,57 @@ +.TH ASA 1 +.SH NAME +asa \- interpret carriage-control characters +.SH SYNOPSIS +.B asa +.IR file +.SH DESCRIPTION +.B asa +maps carriage-control characters from a text file to line-printer +control sequences. The first character of every line is removed from +the input, with the following actions being performed. +.PP +If the character removed is: +.PP +.nf +.RS + \- The rest of the line is output without change +.PP +0 \- A is output, then the rest of the input line. +.PP +1 \- A is output, then the rest of the input line. +.PP ++ \- A is output, then the rest of the input line. +.RE +.fi +.PP +If asa encounters any other characters, it behaves as if it +encountered . +.SH OPTIONS +None +.SH EXAMPLES +.nf +.RS +asa \fIfile\fR +.RE +.fi +.PP +outputs +.IR file +to the terminal +.PP +.nf +.RS +a.out | asa | lp +.RE +.fi +.PP +formats the FORTRAN output of +.B a.out +and directs it to the printer. +.SH AUTHOR +Written by Kat. +.SH COPYRIGHT +Copyright (C) 2019 Katlynn Richey +.PP +This software is free software. Feel free to modify it and/or pass +it around. diff --git a/basename.1 b/basename.1 new file mode 100755 index 0000000..9e85a4d --- /dev/null +++ b/basename.1 @@ -0,0 +1,40 @@ +.TH BASENAME 1 +.SH NAME +basename \- return non-directory portion of a pathname +.SH SYNOPSIS +.B basename +.IR string +[\fIsuffix\fR] +.SH DESCRIPTION +.B basename +strips a pathname of everything but the string following the last +slash and prints the result. If the pathname has a trailing slash, +it is removed, and it prints everything past the slash before it. If +a suffix is included, it will remove the suffix from the basename +before printing it. +.SH OPTIONS +None +.SH EXAMPLES +.PP +.nf +.RS +basename /usr/share/include/stdio.h +.RE +.fi +.PP +Prints out "stdio.h" +.PP +.nf +.RS +basename /usr/share/include/stdio.h .h +.RE +.fi +.PP +Prints out "stdio" +.SH AUTHOR +Written by Kat. +.SH COPYRIGHT +Copyright (C) 2019 Katlynn Richey +.PP +This software is free software. Feel free to modify it and/or pass +it around. diff --git a/cat.1 b/cat.1 new file mode 100755 index 0000000..b787a2e --- /dev/null +++ b/cat.1 @@ -0,0 +1,57 @@ +.TH CAT 1 +.SH NAME +cat \- concatenate and print files +.SH SYNOPSIS +.B cat +[\fB\-u\fR] +.IR file ... +.SH DESCRIPTION +.B cat +reads in files one at a time and prints the contents to standard +output. If \- is read, \fBcat\fR reads from standard input. +.SH OPTIONS +.TP +.BR \-u +Writes bytes from the input files to standard output without delay +as each is read. Writing with this flag is unbuffered. +.SH EXAMPLES +cat file +.PP +.nf +.RS +writes the contents of file to standard output +.RE +.fi +.PP +cat file1 file2 > all_files +.PP +.nf +.RS +concatenates the files \fBfile1\fR and \fBfile2\fR and writes the +result to \fBall_files\fR. +.RE +.fi +.PP +cat file2 >> file1 +.PP +.nf +.RS +appends the contents of \fBfile2\fR into \fBfile1\fR +.RE +.fi +.PP +cat header_text - > table +.PP +.nf +.RS +writes the contents of \fBheader_text\fR into \fBtable\fR then +reads from standard input and writes it into \fBtable\fR +.RE +.fi +.SH AUTHOR +Written by Kat. +.SH COPYRIGHT +Copyright (C) 2019 Katlynn Richey +.PP +This software is free software. Feel free to modify it and/or pass +it around. diff --git a/cksum.1 b/cksum.1 new file mode 100755 index 0000000..c4c471c --- /dev/null +++ b/cksum.1 @@ -0,0 +1,20 @@ +.TH CKSUM 1 +.SH NAME +cksum \- write file checksums and sizes +.SH SYNOPSIS +.B cksum +.IR file ... +.SH DESCRIPTION +.B cksum +calculates and outputs to standard output a cyclic redundancy check +for each file it takes in, in addition to the number of octets in +each file. +.SH OPTIONS +None +.SH AUTHOR +Written by Kat +.SH COPYRIGHT +Copyright (C) 2019 Katlynn Richey +.PP +This software is free software. Feel free to modify it and/or pass +it around. diff --git a/cmp.1 b/cmp.1 new file mode 100755 index 0000000..ba5dc09 --- /dev/null +++ b/cmp.1 @@ -0,0 +1,32 @@ +.TH CMP 1 +.SH NAME +cmp \- compare two files +.SH SYNOPSIS +.B cmp +[\fB\-l\fR|\fB\-s\fR] +.IR file1 +.IR file2 +.SH DESCRIPTION +.B cmp +compares two files. If the two files are identical, \fBcmp\fR writes +no output. Otherwise, by default, it outputs the byte and line +number of the first difference. +.PP +If the two files are of different lengths, \fBcmp\fR also writes the +name of the shorter file to stderr. +.SH OPTIONS +.TP +.BR \-l +.TP +Outputs the byte number and differing byte for each difference +.BR \-s +Suppresses all output, even when the files differ. If the two files +are of differing lengths, it also suppresses that notice. A +difference in the two files is indicated through exit status only. +.SH AUTHOR +Written by Kat. +.SH COPYRIGHT +Copyright (C) 2019 Katlynn Richey +.PP +This software is free software. Feel free to modify it and/or pass +it around. diff --git a/dirname.1 b/dirname.1 new file mode 100755 index 0000000..ec523f1 --- /dev/null +++ b/dirname.1 @@ -0,0 +1,45 @@ +.TH DIRNAME 1 +.SH NAME +dirname \- return directory portion of a pathname +.SH SYNOPSIS +.B dirname +.IR string +.SH DESCRIPTION +.B dirname +strips a pathname of everything following the last slash and prints +the result. If the pathname has a trailing slash, it is removed and +it strips everything past the slash before it. +.SH OPTIONS +None +.SH EXAMPLES +.PP +.nf +.RS +dirname /usr/share/include/stdio.h +.RE +.fi +.PP +Prints out "/usr/share/include" +.PP +.nf +.RS +dirname stdio.h +.RE +.fi +.PP +Prints out "." +.PP +.nf +.RS +dirname // +.RE +.fi +.PP +Prints out "/" +.SH AUTHOR +Written by Kat. +.SH COPYRIGHT +Copyright (C) 2019 Katlynn Richey +.PP +This software is free software. Feel free to modify it and/or pass +it around. diff --git a/echo.1 b/echo.1 new file mode 100755 index 0000000..1c93bfb --- /dev/null +++ b/echo.1 @@ -0,0 +1,54 @@ +.TH ECHO 1 +.SH NAME +echo \- print text to stdout +.SH SYNOPSIS +.B echo +.IR string +.SH DESCRIPTION +.B echo +writes any arguments it receives to standard output, followed by a +single . If it receives no arguments, it only outputs a +single . + +In strings contained in quotes, \fBecho\fR recognises the following +character sequences: +.TP +.B \ea +Beeps the PC speaker (writes an ). +.TP +.B \eb +Writes a . +.TP +.B \ec +Makes \fBecho\fR not print a newline following the output. +.TP +.B \ef +Writes a . +.TP +.B \en +Writes a . +.TP +.B \er +Writes a . +.TP +.B \et +Writes a . +.TP +.B \ev +Writes a . +.TP +.B \e\e +Writes a (\e). +.TP +.B \e0\fInum\fR +Writes the character corresponding to the 8-bit octal number +\fInum\fR +.SH OPTIONS +None +.SH AUTHOR +Written by Kat. +.SH COPYRIGHT +Copyright (C) 2019 Katlynn Richey +.PP +This software is free software. Feel free to modify it and/or pass +it around. diff --git a/expand.1 b/expand.1 new file mode 100755 index 0000000..aa65cf3 --- /dev/null +++ b/expand.1 @@ -0,0 +1,58 @@ +.TH EXPAND 1 +.SH NAME +expand \- convert tabs to spaces +.SH SYNOPSIS +.B expand +[\fB\-t\fR \fItablist\fR] +.IR file ... +.SH DESCRIPTION +.B expand +writes files to the standard output with any characters +replaced with one or more characters to pad to the next tab +stop. By default, there is a tab stop every 8 characters. +.SH OPTIONS +.TP +.BR -t " " \fItablist\FR +Takes in one or more space-separated numbers to set the number of +spaces between each tab stop. +.SH EXAMPLES +.nf +.RS +expand file +.RE +.fi +.PP +replaces characters in file with enough characters to +pad to a tab stop every 8 columns. +.PP +.nf +.RS +expand -t 10 file +.RE +.fi +.PP +replaces characters in file with enough characters to +pad to a tab stop every 10 columns. +.PP +.nf +.RS +expand -t 10 5 8 file +.RE +.fi +.PP +replaces the first in every line of file with enough +characters to pad to a tab stop on column 10, the second with +enough characters to pad to a tab stop 5 columns after the +first tab stop, then the third with enough characters +to pad to a tab stop 8 columns after the second tab stop. Any +further characters on a line will be replaced with a single +. +.SH AUTHOR +Written by Kat. +.SH COPYRIGHT +Copyright (C) 2019 Katlynn Richey +.PP +This software is free software. Feel free to modify it and/or pass +it around. +.PP +This \fBexpand\fR implementation is a part of the fenutils package. diff --git a/false.1 b/false.1 new file mode 100755 index 0000000..256d75d --- /dev/null +++ b/false.1 @@ -0,0 +1,27 @@ +.TH TRUE 1 +.SH NAME +false \- consistently fails +.SH SYNOPSIS +.B false +.SH DESCRIPTION +.B false +never succeeds. It always returns 1. It does literally nothing else +It has no options. It has no operands. It doesn't use stdin, stdout, +or stderr. It doesn't rely on environment variables. It doesn't use +files. It's guaranteed to always fail or we'll give you a full +refund. It just returns one. +.PP +According to the POSIX standard, this program should always exit +some non-zero value. That is literally all this program does. It +returns anything but 0. +.SH OPTIONS +None +.SH AUTHOR +"Written" by Kat. +.SH COPYRIGHT +Copyright (C) 2019 Katlynn Richey +.PP +This software is free software. Feel free to modify it and/or pass +it around. +.PP +This \fBfalse\fR implementation is a part of the fenutils package. diff --git a/head.1 b/head.1 new file mode 100755 index 0000000..733eccb --- /dev/null +++ b/head.1 @@ -0,0 +1,36 @@ +.TH HEAD 1 +.SH HEAD +head \- copy the first part of files +.SH SYNOPSIS +.B head +[\fB\-n\fR \fInumber\fR] +.IR "file" ... +.SH DESCRIPTION +.B head +copies input files to the standard output, ending at a designated point. +.PP +Copying ends at the the point indicated by the \fB\-n\fR option. +If \fB\-n\fR is omitted, \fBhead\fR will default to 10. +.SH OPTIONS +.TP +.BR \-n " " \fInumber\fR +Specifies the number of lines to copy to standard output. +.SH EXAMPLES +An example example: +.PP +.nf +.RS +head -- * +.RE +.fi +.PP +Copies the first ten lines of all files to standard output. +.SH AUTHOR +Written by Kat. +.SH COPYRIGHT +Copyright (C) 2019 The FENIX Project +.PP +This software is free software. Feel free to modify it and/or pass +it around. +.PP +This \fBhead\fR implementation is a part of the fenutils package. diff --git a/link.1 b/link.1 new file mode 100755 index 0000000..e4fd1d0 --- /dev/null +++ b/link.1 @@ -0,0 +1,23 @@ +.TH LINK 1 +.SH NAME +link \- call link(3) +.SH SYNOPSIS +.B link +.IR "file1 file2" +.SH DESCRIPTION +.B link +performs the function call +.B link\fR(\fIfile1\fR \fIfile2\fR); +This creates a hard link from \fIfile2\fR to \fIfile1\fR. +For more information, see link(3). +.SH OPTIONS +None +.SH AUTHOR +Written by Kat. +.SH COPYRIGHT +Copyright (C) 2019 Katlynn Richey +.PP +This software is free software. Feel free to modify it and/or pass +it around. +.PP +This \fBlink\fR implementation is a part of the fenutils package. diff --git a/ln.1 b/ln.1 new file mode 100755 index 0000000..7f2906a --- /dev/null +++ b/ln.1 @@ -0,0 +1,44 @@ +.TH LN 1 +.SH NAME +ln \- link files +.SH SYNOPSIS +.B ln +[\fB\-fs\fR] [\fB\-L\fR|\fB\-P\fR] +.IR "source_file" \fI"target_file"\fR +.PP +.B ln +[\fB\-fs\fR] [\fB\-L\fR|\fB\-P\fR] +.IR "source_file..." \fI"target_dir"\fR +.SH DESCRIPTION +.B ln +creates links to a file or files. If the \fB\-s\fR option is +specified, a symbolic link is created. Otherwise, a hard link is +created. If multiple source files are given, links to each file are +created in the target directory. +.SH OPTIONS +A listing of options +.TP +.BR \-f +Overwrite any existing files with the same name as the link to be +created. +.TP +.BR \-s +Create symbolic links instead of hard links. If specified, any +instances of \fB\-L\fR and \fB\-P\fR are ignored. +.TP +.BR \-L +If a source file is a symbolic link, create a link to the file +referenced by the symbolic link. +.TP +.BR \-P +If a source file is a symbolic link, create a link to the symbolic +link. +.SH AUTHOR +Written by Kat. +.SH COPYRIGHT +Copyright (C) 2019 Katlynn Richey +.PP +This software is free software. Feel free to modify it and/or pass +it around. +.PP +This \fBln\fR implementation is a part of the fenutils package. diff --git a/pwd.1 b/pwd.1 new file mode 100755 index 0000000..d915339 --- /dev/null +++ b/pwd.1 @@ -0,0 +1,31 @@ +.TH PWD 1 +.SH PWD +pwd \- print working directory path +.SH SYNOPSIS +.B pwd +[\fB\-L\fR|\fB\-P\fR] +.SH DESCRIPTION +.B pwd +writes the pathname of the current working directory to +standard output. +.SH OPTIONS +.TP +.BR \-L +Retains any symbolic links in the current pathname. For instance, +if "a" is a symbolic link to "b", then "a" will be the name shown +if "a" was used in navigating to the current directory. +.TP +.BR \-P +Removes any symbolic links and shows the physical pathname. For +instance, if "a" is a symbolic link to "b", then "b" will be the +name shown, even if "a" was used in navigating to the current +directory +.SH AUTHOR +Written by Kat +.SH COPYRIGHT +Copyright (C) 2019 Katlynn Richey +.PP +This software is free software. Feel free to modify it and/or pass +it around. +.PP +This \fBpwd\fR implementation is a part of the fenutils package. diff --git a/true.1 b/true.1 new file mode 100755 index 0000000..40d5b9b --- /dev/null +++ b/true.1 @@ -0,0 +1,26 @@ +.TH TRUE 1 +.SH NAME +true \- successfully succeeds +.SH SYNOPSIS +.B true +.SH DESCRIPTION +.B true +returns successfully. It always returns 0. It does literally nothing +else. It has no options. It has no operands. It doesn't use stdin, +stdout, or stderr. It doesn't rely on environment variables. It +doesn't use files. It's guaranteed to never fail or we'll give you +a full refund. It just returns zero. +.PP +Hell, if you look at the POSIX standard, exit status literally just +says "Zero". That is literally all this program does. It returns 0. +.SH OPTIONS +None +.SH AUTHOR +"Written" by Kat. +.SH COPYRIGHT +Copyright (C) 2019 Katlynn Richey +.PP +This software is free software. Feel free to modify it and/or pass +it around. +.PP +This \fBtrue\fR implementation is a part of the fenutils package. diff --git a/tty.1 b/tty.1 new file mode 100755 index 0000000..fb3405d --- /dev/null +++ b/tty.1 @@ -0,0 +1,20 @@ +.TH TTY 1 +.SH NAME +tty \- return user's terminal name +.SH SYNOPSIS +.B tty +.SH DESCRIPTION +.B tty +writes the name of the device connected to standard output. It also +returns 0 if the device is a tty. Otherwise it returns 1. +.SH OPTIONS +None +.SH AUTHOR +Written by Kat. +.SH COPYRIGHT +Copyright (C) 2019 Katlynn Richey +.PP +This software is free software. Feel free to modify it and/or pass +it around. +.PP +This \fBtty\fR implementation is a part of the fenutils package. diff --git a/wc.1 b/wc.1 new file mode 100755 index 0000000..7ec05c1 --- /dev/null +++ b/wc.1 @@ -0,0 +1,38 @@ +.TH WC 1 +.SH NAME +wc \- word, line, and byte/character count +.SH SYNOPSIS +.B wc +[\fB\-m\fR|\fB\-c\fR] +[\fB\-lw\fR] +.IR file ... +.SH DESCRIPTION +.B wc +writes the number of bytes in each input file to standard output. +Optionally, \fBwc\fR can also write the number of +characters and/or words to standard output as well. If more than one +file is specified, it will also write the total across all files +given as input. +.SH OPTIONS +A listing of options +.TP +.BR \-c +Write the number of bytes in each file +.TP +.BR \-l +Write the number of characters in each file +.TP +.BR \-m +Write the number of characters in each file +.TP +.BR \-w +Write the number of words in each file +.SH AUTHOR +Written by Kat. +.SH COPYRIGHT +Copyright (C) 2019 Katlynn Richey +.PP +This software is free software. Feel free to modify it and/or pass +it around. +.PP +This \fBwc\fR implementation is a part of the fenutils package.