GETCWD(1)

πŸ“¦ version 2.9.9.2, in nixpkgs unstable

πŸ’– GETCWD(1) πŸ’–

okay so bestie, this is GETCWD(1) from the General Commands Manual β€” it’s the execline girlie that stores your current working directory into a given environment variable, then executes a program. slay.


✨ NAME ✨

getcwd β€” store current working directory into a given environment variable, then executes a program πŸ’…


🌸 SYNOPSIS 🌸

getcwd [-E | -e] var prog...

πŸ¦‹ DESCRIPTION πŸ¦‹

getcwd stores a fully resolved absolute path (i.e. without any .. or symbolic link components) to its current working directory into the var variable, then exec(3)s into prog with its arguments. no cap.

var must be given without a dollar! ⚠️

var must not contain the character β€˜=’.

Unlike the pwd(1) POSIX command, getcwd does not depend on the PWD environment variable and will exhibit a consistent behaviour no matter the environment. it’s giving dependable, periodt.


πŸŽ€ OPTIONS πŸŽ€

  • -e β€” No autoimport. This is the default. like, it’s already the vibe unless you say otherwise.
  • -E β€” Autoimport. Instead of exec(3)ing into prog..., exec(3) into importas -ui var var prog.... This substitutes var into the command line instead of putting it into the environment. big-brain move, honestly.

πŸ”₯ SEE ALSO πŸ”₯

go check out: emptyenv(1), envfile(1), exec(1), execline-cd(1), execline-umask(1), exit(1), export(1), fdblock(1), fdclose(1), fdmove(1), fdreserve(1), fdswap(1), getpid(1), heredoc(1), piperw(1), posix-cd(1), posix-umask(1), pwd(1), redirfd(1), trap(1), tryexec(1), unexport(1), wait(1), withstdinas(1), exec(3)

This man page is ported from the authoritative documentation at: https://skarnet.org/software/execline/getcwd.html


πŸ‘‘ AUTHORS πŸ‘‘

  • Laurent Bercot
  • Alexis <flexibeast@gmail.com> (man page port)

πŸ’Œ okay bye bestie β€” this one’s Debian-coded, dated February 14, 2021, and filed under GETCWD(1). mwah 🫢

πŸ“¦ where this page comes from