명령의 출력을로 리디렉션 할 수 cd있습니까? 예를 들어, 사용하여 디렉토리를 검색 locate하고 경로를 얻었습니다. 이제 cd경로 를 작성하는 대신 locate출력을 cd?
나는 이것을 시도했다 :
$ 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
$
불운. 이것은 특히 유용하지는 않지만 궁금합니다.