I can't find a way to pass output of whereis
command to cd
command in same line so I don't have to do cd
in the second step.
I have tried passing like below:
cd $(whereis node_modules)
Or
cd "`dirname $(whereis node_modules)`"
Also
cd "$(whereis node_modules)"
But none of the above method works.
Can somebody find what should be wrong in above codes ?
bash: cd: . /usr/local/lib: No such file or directory
– Vicky Dev Jun 18 '16 at 09:38