Quantcast
Channel: When using a variable to set the path, I get "No such file or directory", but works fine otherwise - Ask Ubuntu
Viewing all articles
Browse latest Browse all 3

When using a variable to set the path, I get "No such file or directory", but works fine otherwise

$
0
0

I set the variable CATKIN_WS="~/catkin_ws", but when I use it, it does not work. However, if I simply go to the path that I have set it at, I have no problems. Why does it not work when I set it as a variable, but works otherwise?

(venv) cedric@ubuntu-cedric:~$ echo $CATKIN_WS
~/catkin_ws
(venv) cedric@ubuntu-cedric:~$ cd $CATKIN_WS
bash: cd: ~/catkin_ws: No such file or directory
(venv) cedric@ubuntu-cedric:~$ cd ~/catkin_ws/
(venv) cedric@ubuntu-cedric:~/catkin_ws$

Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images