pwd
Format:
pwd
To display the current working directory, type:
$ pwd
/var/spool
$ WHERE_AM_I=‘pwd‘
$ echo $WHERE_AM_I
/var/spool
Substitution is used to grab the current working directory in a script.
Get Linux and Unix Shell Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.