Artifact 0d466178e0b0d26814bd348aed739ccfca333a46230ae506163b74bbe8a5bd6e:
- File doc/markdown/Tcl/pwd.md — part of check-in [b84ce0eee1] at 2026-10-04 22:10:02 on branch tip-700 — file location re-organisation (part 1) (user: Torsten, size: 1051) [annotate] [blame] [check-ins using]
- File doc/markdown/pwd.md — part of check-in [5e80e55e41] at 2026-09-26 22:40:07 on branch tip-700 — - added a "title" metadata element to the generated yaml block to satisfy Pandoc when converting to HTML - added markdown2html.tcl as prototype/placeholder of conversion script markdown -> HTML - added some CSS to play with a good visual representation of the generated HTML, starting with the n section pages - fixed man2markdown.tcl not giving the two .TP/.IP parsing places the same treatment (user: Torsten, size: 1051) [annotate] [blame] [check-ins using]
CommandName: pwd title: pwd ManualSection: n Version: unknown TclPart: Tcl TclDescription: Tcl Built-In Commands Links:
- file(n)
- cd(n)
- glob(n)
- filename(n) Keywords:
- working directory Copyright:
- Copyright (c) 1993 The Regents of the University of California.
- Copyright (c) 1994-1996 Sun Microsystems, Inc. ---
Name
pwd - Return the absolute path of the current working directory
Synopsis
::: {.synopsis} ::: [pwd]{.cmd} :::
Description
Returns the absolute path name of the current working directory.
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:
set tarFile [file normalize somefile.tar]
set savedDir [pwd]
cd /tmp
exec tar -xf $tarFile
cd $savedDir