NAME
quickabspath - Print the absolute path, without resolving symlinks
VERSION
This document describes version 0.001 of quickabspath (from Perl distribution App-quickabspath), released on 2021-07-15.
SYNOPSIS
% quickabspath [OPTION]... <FILE>...
To demonstrate how realpath
, quickabspath
, and relpath
give you different results:
% pwd
/home/ujang
% mkdir dir1
% ln -s dir1 sym1
% cd sym1
% realpath . ;# gives absolute path and resolve symlinks
/home/ujang/dir1
% abspath . ;# an alias for realpath
/home/ujang/dir1
% quickabspath . ;# gives absolute path but does not resolve symlinks
/home/ujang/sym1
% relpath /home/ujang/dir1
.
% relpath /home/ujang/sym1
../sym1
DESCRIPTION
This is like the Unix utility realpath, but without resolving symbolic links. It requires PWD
environment variable from the shell. It then just uses File::Spec's rel2abs
against the specified path. This means if the path is already an absolute path, nothing will be done (no checking that path elements exist, no resolving of symbolic links).
EXIT CODES
0 on success.
99 on command-line options error.
OPTIONS
FAQ
HOMEPAGE
Please visit the project's homepage at https://metacpan.org/release/App-quickabspath.
SOURCE
Source repository is at https://github.com/perlancar/perl-App-quickabspath.
BUGS
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=App-quickabspath
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
Unix utility realpath
AUTHOR
perlancar <perlancar@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2021 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.