NAME
first-arg - Print the first command-line argument to standard output
VERSION
This document describes version 0.001 of first-arg (from Perl distribution App-ArgUtils), released on 2020-08-26.
SYNOPSIS
Usage:
% first-arg [option] [arg]...
Examples:
% first-arg "first arg" second third
first arg
# but usually useless to use with backtick
% media-info `first-arg *` ; # problem with quoting
% media-info `first-arg -q *` ; # problem with quoting
% ls | head -n1 | xargs media-info ; # problem with quoting
# use with shell's read
% first-arg * | ( read p && media-info "$p" )
DESCRIPTION
OPTIONS
-q
Shell-quote the argument.
-0
Print null character ("\0") after the argument, instead of newline ("\n").
HOMEPAGE
Please visit the project's homepage at https://metacpan.org/release/App-ArgUtils.
SOURCE
Source repository is at https://github.com/perlancar/perl-App-ArgUtils.
BUGS
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=App-ArgUtils
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
SEE ALSO
AUTHOR
perlancar <perlancar@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by perlancar@cpan.org.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.