1pwd(n)                       Tcl Built-In Commands                      pwd(n)
2
3
4
5______________________________________________________________________________
6

NAME

8       pwd - Return the absolute path of the current working directory
9

SYNOPSIS

11       pwd
12_________________________________________________________________
13
14

DESCRIPTION

16       Returns the absolute path name of the current working directory.
17

EXAMPLE

19       Sometimes it is useful to change to a known directory when running some
20       external command using exec, but it is important to keep  the  applica‐
21       tion  usually  running  in the directory that it was started in (unless
22       the user specifies otherwise) since that minimises user confusion.  The
23       way to do this is to save the current directory while the external com‐
24       mand is being run:
25              set tarFile [file normalize somefile.tar]
26              set savedDir [pwd]
27              cd /tmp
28              exec tar -xf $tarFile
29              cd $savedDir
30
31

SEE ALSO

33       file(n), cd(n), glob(n), filename(n)
34
35

KEYWORDS

37       working directory
38
39
40
41Tcl                                                                     pwd(n)
Impressum