[xubuntu-users] Problem with Alias
Ralf Mardorf
ralf.mardorf at rocketmail.com
Fri May 1 07:34:18 UTC 2015
On Fri, 01 May 2015 09:05:28 +0200, Hartmut Haase wrote:
>alias mopac='cd/opt/mopac ; MOPAC2012.exe'
^ add a space
It's a good idea to change into the directory. But I'm not sure if this
is allowed, does work. Have you tested what happens if you run a
program this way?
alias foo='cd /bar/ ; FOO.bin"
What happens if you run it with an option?
foo --option
I'm to lazy to test it. Assumed it shouldn't work, a wrapper could do.
To /usr/local/bin add a script named mopac and make it executable with
chmod:
#!/usr/bin/env dash
cd /opt/mopac
MOPAC2012.exe $@
# perhaps try MOPAC2012.exe "$*"
# or MOPAC2012.exe $*
exit
More information about the xubuntu-users
mailing list