From bee01650744f8090036c6cc994a6dbf8f0db66c6 Mon Sep 17 00:00:00 2001 From: DTB Date: Fri, 16 Feb 2024 01:40:38 -0700 Subject: [PATCH 1/2] scrut(1): add man page --- docs/scrut.1 | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 docs/scrut.1 diff --git a/docs/scrut.1 b/docs/scrut.1 new file mode 100644 index 0000000..9e536a6 --- /dev/null +++ b/docs/scrut.1 @@ -0,0 +1,92 @@ +.\" Copyright (c) 2024 DTB +.\" +.\" This work is licensed under CC BY-SA 4.0. To see a copy of this license, +.\" visit . + +.TH scrut 1 + +.SH NAME + +scrute \(en scrutinize file properties + +.SH SYNOPSIS + +scrut +.RB ( -bcdefgkprsuwxLS ) +.RB [ file... ] + +.SH DESCRIPTION + +Scrut determines if given files comply with the opted requirements. + +.SH OPTIONS + +.B -b +requires the given files to exist and be block special files. +.PP +.B -c +requires the given files to exist and be character special files. +.PP +.B -d +requires the given files to exist and be directories. +.PP +.B -e +requires the given files to exist, and is redundant to any other option. +.PP +.B -e +requires the given files to exist and be regular files. +.PP +.B -g +requires the given files to exist and have their set group ID flags set. +.PP +.B -k +requires the given files to exist and have their sticky bit set. +.PP +.B -p +requires the given files to exist and be named pipes. +.PP +.B -r +requires the given files to exist and be readable. +.PP +.B -u +requires the given files to exist and have their set user ID flags set. +.PP +.B -w +requires the given files to exist and be writable. +.PP +.B -x +requires the given files to exist and be executable. +.PP +.B -L +requires the given files to exist and be symbolic links. +.PP +.B -S +requires the given files to exist and be sockets. + +.SH EXIT STATUS + +Scrut prints a debug message and exits unsuccessfully with the appropriate +sysexits(3) error code if invoked incorrectly. Scrut exits successfully if the +given files comply with their requirements and unsuccessfully otherwise. + +.SH STANDARDS + +Scrut is nearly compatible with POSIX's test utility though it is narrower in +scope. Notably, the +.B -h +option now shows usage information instead of being an alias to the modern +.B -L +option. + +.SH AUTHOR + +Written by DTB . + +.SH COPYRIGHT + +Copyright © 2024 DTB. License AGPLv3+: GNU AGPL version 3 or later +. + +.SH SEE ALSO + +access(3p), lstat(3p), test(1p) From de9f8dc0375f5e392f8ad17d722162fcbb3ea5e7 Mon Sep 17 00:00:00 2001 From: DTB Date: Sat, 17 Feb 2024 23:12:39 -0700 Subject: [PATCH 2/2] scrut.1: update man page based on review (see #62) --- docs/scrut.1 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/scrut.1 b/docs/scrut.1 index 9e536a6..7a5107a 100644 --- a/docs/scrut.1 +++ b/docs/scrut.1 @@ -7,7 +7,7 @@ .SH NAME -scrute \(en scrutinize file properties +scrut \(en scrutinize file properties .SH SYNOPSIS @@ -66,15 +66,16 @@ requires the given files to exist and be sockets. .SH EXIT STATUS Scrut prints a debug message and exits unsuccessfully with the appropriate -sysexits(3) error code if invoked incorrectly. Scrut exits successfully if the -given files comply with their requirements and unsuccessfully otherwise. +sysexits.h(3) error code if invoked incorrectly. Scrut exits successfully if +the given files comply with their requirements and unsuccessfully otherwise. .SH STANDARDS Scrut is nearly compatible with POSIX's test utility though it is narrower in scope. Notably, the .B -h -option now shows usage information instead of being an alias to the modern +option is now invalid and therefore shows usage information instead of being an +alias to the modern .B -L option.