"Jesper FA" <news@skydiver.dk> writes:
> "Byrial Jensen" <bjensen@nospam.dk> wrote in message
> news:slrn98ck36.q4.bjensen@ask.ask...
> > Jesper FA <news@skydiver.dk> skrev:
> > >Jeg har efterhånden nogen tid funderet over om fx make test install ==
> make
> > >test && make install?
> >
> > Hvornår gå og fundere over den slags når det nemt kan slås op i
> > manualen?
>
> Fordi jeg ikke helt kunne tolke om det skulle være det samme som:
> make test ; make install
Man skal også vide, at det er manualen til ens shell, der skal slås op
i.
Prøv "man bash". Den fulde forklaring:
Lists
A list is a sequence of one or more pipelines separated by one
of the operators ;, &, &&, or ||, and optionally terminated by
one of ;, &, or <new line>.
Of these list operators, && and || have equal precedence,
followed by ; and &, which have equal precedence.
If a command is terminated by the control operator &, the shell
executes the command in the background in a subshell. The
shell does not wait for the command to finish, and the return
status is 0. Commands separated by a ; are executed
sequentially; the shell waits for each command to termi nate
in turn. The return status is the exit status of the last
command executed.
The control operators && and || denote AND lists and OR lists,
respectively. An AND list has the form
command1 && command2
command2 is executed if, and only if, command1 returns an exit
status of zero.
An OR list has the form
command1 || command2
command2 is executed if and only if command1 returns a non-zero
exit status. The return status of AND and OR lists is the exit
status of the last command executed in the list.
--
Jens Axel Søgaard --
http://www.jasoegaard.dk
A Mathematician is a machine for turning coffee into theorems.
- Paul Erdös