简体   繁体   中英

multiple bash commands in a line

I'm trying to write multiple bash commands in a single line

source ~/.profile ; vex dl ; cd ~/dl ; make install

However this does'nt do anything. However when I type exit and it runs make install and dies on the first line. However when I run these separately on the command line, everything works fine. I can't see why this does'nt work. Suggestions anyone?

After reading some documentation on vex; it seems you want to run make install in the virtual environment from the dl directory.

This is not bash issue/question but more a vex question.

Try this instead:

source ~/.profile ; vex dl bash -c build.sh

Build.sh should be script that will cd to the dl directory and run make install. The virtual environment will "deactivate" once the script finishes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM