alwbtc
alwbtc

Reputation: 29495

How to set an alias so that it will change directory and run a sh file

I want to have an alias which will do:

>>>cd $MYUSR
>>>bin/start.sh -t

How can I set it? I use bash shell.

Best Regards

Upvotes: 1

Views: 2602

Answers (1)

Kristof Provost
Kristof Provost

Reputation: 26332

What's wrong with the obvious?

alias example='cd $MYUSR ; ./bin/start.sh -t'

To make it permanent you can add it to ~/.bashrc

Upvotes: 6

Related Questions