linux unix


Something I like in ksh is to change from /my/old/directory/path to /my/new/directory/path by typing cd old new. This does not work in bash

So I had to find a workaround 😉

$ ksh
$ cd /app/oracle/product/
$ cd 6 7
$ pwd
$ bash
$ cd 7 6
bash: cd: 7: No such file or directory
$ c() { cd ${PWD/$1/$2}; }
$ c 7 6
$ pwd

By Laurent Schneider

Oracle Certified Master

8 replies on “cd OLD NEW”

[…] Link to the original site Tags: Directory C, Directory Path, No Such File Or Directory, Oracle, ORACLE BLOGS, Oracle Product, Pwd, Workaround […]

Leave a Reply

Your email address will not be published.