read -r path
wslpath -a $path
I want to save the output of wslpath in a variable so I can later use:
cd $converted_path
to change the directory. How can I realize that ?
read -r path
wslpath -a $path
I want to save the output of wslpath in a variable so I can later use:
cd $converted_path
to change the directory. How can I realize that ?
The Bash syntax to capture output of a command is as such:
$MY_VAR=$(wslpath -a $path)
You can later use the variable:
cd $MY_VAR