Tuesday, April 1, 2008

gtm alias for mumps prompt

I'm using the GT.M database on Ubuntu.
I'd like to start a mumps prompt with the keyword gtm



user@machine:$ gtm

GTM>

... instead of having to type:



user@machine:$ $gtm_dist/mumps -direct

GTM>

First I edited the main bash profile:



user@machine:$ vim ~/.bashrc


uncomment out the following lines from:



#if [ -f ~/.bash_aliases ]; then
# . ~/.bash_aliases
#fi

...to:



if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi

Then I open the bash_aliases file



user@machine:$ vim ~/.bash_aliases


... and added the following line:



alias gtm='$gtm_dist/mumps -direct'


After logging out and then logging back in again I was able to start a mumps prompt from a terminal with the word 'gtm'.



user@machine:$ gtm

GTM>W !,"Hello aliased gtm!"

"Hello aliased gtm!"
GTM>

No comments: