I want to go to a directory with using filter
For example there is a file named
ls | grep this-is-awsome | xargs cd
How can I go to a directory with filter?
Salton's comment explains the problem. Here are some solutions:
This is probably not so good, with all the usual caveats about parsing the output of
A slightly better version (assumes GNU
Yet another (maybe even better) solution if you're using Bash: