Programmer Guide/Command Reference/PWD: Difference between revisions

From STX Wiki
Jump to navigationJump to search
(initial import)
 
No edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
==PWD==
<var>var</var> := PWD [ <var>directory</var> ]


<code>var := PWD [<var>directory</var>]</code>
Set and or get current working directory. The directory is not changed if <var>directory</var> is omitted.


-> var = 'currentworkingdirectory' or empty if failed
Either way, the command will return the current working directory on success, or an empty string on failure (e.g. when you have tried to change to a non-existent directory).


Set and or get current working directory. The directory is not changed if <var>directory</var> is not specified.
Note that if you are working with scripts, the script directory is stored in the shell variable <var>scriptDirectory</var>. See also [[Programmer Guide/Introduction/Global Variables#.40ROOT|@ROOT]] and [[Programmer Guide/Introduction/Global Variables#.40WORK|@WORK]].
 
If you are working with scripts (*.sts), the script directory is stored in the shell variable <code>scriptDirectory</code>.See also: @ROOT and @WORK

Latest revision as of 11:37, 13 December 2016

var := PWD [ directory ]

Set and or get current working directory. The directory is not changed if directory is omitted.

Either way, the command will return the current working directory on success, or an empty string on failure (e.g. when you have tried to change to a non-existent directory).

Note that if you are working with scripts, the script directory is stored in the shell variable scriptDirectory. See also @ROOT and @WORK.

Navigation menu

Personal tools