A program requires local path property to perform correctly. I'm seeking shortcut command to execute a program with a supplied localPath

For example,

cd /usr/local/blogrmis
/usr/local/blogrmis/remote & 

remote program requires local path @ /usr/local/blogrmis to run. is there any shortcut which i can do it in 1 line?

link|improve this question
feedback

2 Answers

up vote 1 down vote accepted

If the program must be run with the current working directory set to the directory containing the program you can combine both commands on one line:

 cd /usr/local/blogrmis; ./remote &

To shorten this you can create an alias (one-off, or permanently in your shell's .profile file)

 alias blogrmis="(cd /usr/local/blogrmis; ./remote &)" 

then you just type

 blogrmis

Or create and use a shell-function (see man bash)

link|improve this answer
feedback

Try this

cd /usr/local/blogrmis ; /usr/local/blogrmis/remote &

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.