I want to find a directory using grep
then change current directory to the resulting directory.
For example:
$ ls | grep 1670 |
finds me directory haib12CJS1670. I am trying to do something like below:
$ ls | grep 1670 | cd
so that my directory is set to haib12CJS1670 at a single step. Obviously my way is not working. Any suggestions? Thank you
grep
instead of globbing (i.e.,cd *1670*
?)