NAME
last-arg - Print the last command-line argument to standard output
VERSION
This document describes version 0.001 of last-arg (from Perl distribution App-ArgUtils), released on 2020-08-26.
SYNOPSIS
Usage:
% last-arg [option] [arg]...
Examples:
% last-arg "first arg" second "third arg"
third arg
# but usually useless to use with backtick
% media-info `last-arg *` ; # problem with quoting
% media-info `last-arg -q *` ; # problem with quoting
% ls | tail -n1 | xargs media-info ; # problem with quoting
# use with shell's read
% last-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.