Is it possible to redirect a command's output to cd
? For example, I searched for a directory using locate
and got the path to it. Now, instead of writing a cd
path, can I redirect the locate
output to cd
?
I tried this:
$ locate Descargas | grep Descargas$
/home/oliver/Descargas
$ locate Descargas | grep Descargas$ | cd
$ locate Descargas | grep Descargas$ > cd
$ locate Descargas | grep Descargas$ < cd
/home/oliver/Descargas
$
No luck. This probably isn't particularly useful, but I'm curious.