Answers for "bash save current path to variable"

1

bash save current path to variable

# Saves the current path to the variable "your_variable":
your_variable=$(pwd)

# Go to the path inside the variable:
cd $your_variable
Posted by: Guest on October-16-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language