I want to create an alias for pagsh
that will immediately get me the admin kerberos ticket.
The problem is that I can't figure out how to specify a command for the bash
to run, but still continue with the interactive session after the command is done.
My current shot is:
alias admin=pagsh -c "bash -c \"kinit [email protected]\""
but bash
logically ends right after kinit
is done. How can I push a custom command into a begging of an interactive session of bash? I still need to run .bashrc normally, therefore I can't use --rcfile
My advice would be using a custom bashrc file with --rcfile
that sources your .bashrc, ex :
alias admin=pagsh -c "bash --rcfile myrc"
myrc :
source ~/.bashrc
kinit [email protected]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With