Sample Header Ad - 728x90

How to use substitute with cd command in Linux

0 votes
3 answers
580 views
We recently migrated from **HP-UX B.11.31** to **Linux 3.10.0-1160.15.2.el7.x86_64**. I am trying to achieve the below (which worked in the earlier HP-UX system): $ pwd /global/app/opt/prod/ee/01/custo/src/ $ cd prod qa /global/app/opt/qa/ee/01/custo/src/ $ pwd /global/app/opt/qa/ee/01/custo/src/ Basically, it switches from **prod** to **qa**, maintaining the relative directory structure. when I try the same think in Linux: $ pwd /global/app/opt/prod/ee/01/custo/src/ $ cd prod qa -bash: cd: prod: No such file or directory $ pwd /global/app/opt/prod/ee/01/custo/src/ Here, the directory doesn't change. Please help.
Asked by Aman S. Aneja (3 rep)
Jul 10, 2021, 06:06 PM
Last activity: Feb 14, 2023, 09:40 PM