Edit: I just realised that
second are just placeholders for your real dirnames, right?
In that case, instead of an alias you can create a function in your
cd -- "$first"; pwd; ls; cd -- "$second"; ls
~/.bashrc and then you can call pipe with 2 input arguments (the names of your
pipe first_dir_name second_dir_name
You can create an alias for this series of commands.
Add to your
~/.bashrc the following line:
# 'pipe' is the name of your alias, you can choose any name you want
alias pipe="cd first; pwd; ls; cd second; ls"
You can now start executing
pipe in your terminal that will be executing your series of commands. Of course, you have to ensure that you call
pipe from the correct dir that allows you to
cd to the