bash - cd in pipe after getting folder path -


when run command, folder of local gem installed:

e.g.

bundle show gem  /users/user/projects/project/vendor/cache/gem-856752cd48f0 

can use pipe cd folder path?

e.g.

bundle show gem | ??? 

what replace question marks with?

you can use cd output of command:

cd "$(bundle show gem)" 

if want pipe, make use of xargs this:

bundle show gem | xargs cd 

Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -