Answer to Question #317653 in UNIX/Linux Programming for NATH

Question #317653

Write Linux Shell script to display current working directory.  


1
Expert's answer
2022-03-25T04:36:52-0400
echo "The current working directory: $PWD"
echo "The previous current working directory: $OPLDPWD"
_cwd="$PWD"
 
## use pwd command ##
_mydir="$(pwd)"
 
## or ##
_mydir="`pwd`"
 
echo "My working dir: $_mydir"

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS