pwd(n)
π NAME π
okay so bestie, meet pwd(n) β a Tcl Built-In Command that returns the absolute path of the current working directory. From the Tcl Built-In Commands manual, page pwd(n). That's the whole job. iconic β¨
β¨ SYNOPSIS β¨
pwd
That's the whole synopsis, bestie. No drama, just pwd π
π DESCRIPTION π
When you run pwd, it returns the absolute path name of the current working directory. Like, the full path name, no cap. Slay. π«Ά
πΈ EXAMPLE πΈ
Sometimes it is useful to change to a known directory when running some external command using exec, but it is important to keep the application usually running in the directory that it was started in β unless the user specifies otherwise β since that minimizes user confusion. The way to do this is to save the current directory while the external command is being run, like this:
set tarFile [file normalize somefile.tar]
set savedDir [pwd]
cd /tmp
exec tar -xf $tarFile
cd $savedDir
Save the dir, dip out, do the thing, come back. Main character energy fr fr π₯
π SEE ALSO π
π§ KEYWORDS π§
- working directory
Source/version: Tcl, page pwd(n); date: not listed in the original footer, bestie β mwah πβ¨ periodt π
π¦ where this page comes from
- alpine 3.23: tcl9-doc 9.0.3-r0 Β· TCL
- alpine 3.24: tcl9-doc 9.0.3-r2 Β· TCL
- fedora 43: tcl-doc 1:9.0.2-1.fc43 Β· TCL AND GPL-3.0-or-later WITH Bison-exception-2.2 AND BSD-3-Clause
- fedora 44: tcl-doc 1:9.0.2-1.fc44 Β· TCL AND GPL-3.0-or-later WITH Bison-exception-2.2 AND BSD-3-Clause
- nixos 26.05: tcl 9.0.3
- nixpkgs unstable: tcl 9.1.0
- Copyright (c) 1993 The Regents of the University of California
- Copyright (c) 1994-1996 Sun Microsystems, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms