Run the following sequence of commands under your shell. What are the outputs of the three pwd commands? Why are the outputs of the last two pwd commands different?

```
$ pwd
$ bash
$ cd /usr
$ pwd
...
$
$ pwd
...
$
```


The outputs of the above commands are shown in the following session. The outputs of the last two pwd commands are different because the first displays the current directory under the sub-shell (which is /usr after the cd /usr has executed). The last pwd command displays the current directory in the parent (original) shell because terminates the sub-shell and returns to the parent shell.
```
$ pwd
/home/faculty/sarwar
$ bash
$ cd /usr
$ pwd
/usr
$
$ pwd
/home/faculty/sarwar
$
```

Computer Science & Information Technology

You might also like to view...

The term ____ refers to any pathway that can be used to transfer data into or out from a computer.

A. port B. slot C. window D. connection

Computer Science & Information Technology

In Windows, files can be grouped into four main categories

Indicate whether the statement is true or false

Computer Science & Information Technology

When defining a variable to be used to hold values that the user enters in a TextBox object, the declaration statement should have ____ at the end of the statement.

A. As Char B. As Char Type C. As String D. As String Type

Computer Science & Information Technology

Assume that the mean average height of a male in the United States is about 72 in., with a standard deviation of 5 in., and that the height of males in the United States matches a normal distribution very well. Identify the location of the area under the standard normal curve for males shorter than 63 in. (For example, for males taller than 72 in., the area would be the area under the curve to the right of 72 in. on the baseline.)

A. The area would be the area under the curve to the right of 63 in. on the baseline. B. The area would be the area under the curve to the left of 72 in. on the baseline. C. The area would be the area under the curve to the right of 72 in. on the baseline. D. The area would be the area under the curve to the right of 63 in. and to the left of 72 in. on the baseline . E. The area would be the area under the curve to the left of 63 in. on the baseline.

Computer Science & Information Technology