Files
args/man/args.1

55 lines
1.3 KiB
Groff

.\" Automatically generated by Pandoc 3.6.4
.\"
.TH "args" "1" "" ""
.SH SYNOPSIS
args ARGUMENT \&...
.SH DESCRIPTION
\f[B]args\f[R] separately prints to standard output each argument it
receives with its position.
.PP
The intended use of this tool is to help understand word splitting and
quote removal by the shell.
.PP
Each argument prints one line of output in the following format.
.IP
.EX
\[at][POSITION] [ARGUMENT]
.EE
.PP
The two fields are separated by a single tab character.
.PP
In case an empty string is received as an argument, it is represented as
follows for clarity.
These quotes are not the actual input.
Quotes would normally be removed by the shell before the command\[cq]s
execution.
.IP
.EX
\[at]1 \[aq]\[aq]
.EE
.SH EXAMPLE
.IP
.EX
$ args one two \[dq]\[dq] \[dq]word with spaces\[dq] $(echo substituted command)
\[at]1 one
\[at]2 two
\[at]3 \[aq]\[aq]
\[at]4 word with spaces
\[at]5 substituted
\[at]6 command
.EE
.PP
If \[at]5 and \[at]6 surprised you, finding cases like these and playing
around is the exact reason this tool exists.
.SH EXIT CODES
0 Success
.PP
1 Failed because no arguments were received
.SH LICENSE
This software is distributed under the license specified in
\f[CR]LICENSE.txt\f[R]
.SH AUTHORS
Kevin Samuel \c
.MT developer@kevinnlsamuel.com
.ME \c.