|
From: Renato S. <br....@gm...> - 2012-10-25 18:25:00
|
2012/10/25 Earnie Boyd <ea...@us...> > On Thu, Oct 25, 2012 at 4:43 AM, Kraus Philipp wrote: > > Hello, > > > > I try to run more than one command within the MinGW shell: cd mydir; > ./configure; make; make install > > but this does not work. The cd command creates the error that the path > does not exists, but if I run each > > command alone all commands are working. > > > > Yes, it works. The execution stops at the first failing command. If > you want the execution of the commands to execute regardless of if > they fail then you need to use || instead of ; where || represents OR. > The ; is being treated as && which represents AND. > > > How can I concat the commands, so that are run one after another? On > Linux I use the ; for seperating each > > command. > > The MSYS shell is bash which is usually what you would use on Linux. > And on Linux a failing command will stop the execution of the multiple > statements on one command line. > > What? Desktop $ cd non-existent; cd failed-again; echo $wat bash.exe: cd: non-existent: No such file or directory bash.exe: cd: failed-again: No such file or directory ; does not skip on errors Desktop $ cd non-existent || echo failed bash.exe: cd: non-existent: No such file or directory failed Desktop $ cd non-existent && echo success bash.exe: cd: non-existent: No such file or directory Desktop $ mkdir non-existent Desktop $ cd non-existent && echo success success non-existent $ |