LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-10-2004, 08:11 AM   #1
timsch75
Member
 
Registered: Feb 2004
Location: austin, TX
Distribution: slackware 10
Posts: 169

Rep: Reputation: 30
what does && mean in compiling instructions


I'm looking at compiling Mplayer and the instructions I'm following keep using the string && in their descriptions. For example:

./configure --prefix=/usr &&
make &&
make install

comes up for the Installation of GLib. This is the same for instructions for other applications/libraries. Is this indicating that I should type in an appropriate directory/file name or something else?

thanks
 
Old 03-10-2004, 08:20 AM   #2
thereof
Member
 
Registered: Jan 2003
Location: Sweden
Distribution: Slackware
Posts: 54

Rep: Reputation: 15
&& = and

Which basically means that you should run the commands ./configure --prefix=/usr and make and make install. First run the ./configure command and when that is done, run make etc.
 
Old 03-10-2004, 12:28 PM   #3
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
A bit more though

; would mean: and

Whereas:
&&
Means: Only complete the next step if this first steps completes successfully (or has an output of 1). It's very useful in compiling a bunch of steps that require the first ones to complete successfully, such as configure:
./configure --with-whatever &&
make

Because you don't want to run make unless you have everything configured properly.

Cool
 
Old 03-10-2004, 02:43 PM   #4
timsch75
Member
 
Registered: Feb 2004
Location: austin, TX
Distribution: slackware 10
Posts: 169

Original Poster
Rep: Reputation: 30
MasterC, you indicate that the && are used in a single string entered on the command line that the computer is to interpret as a sequence of events that are to occur if only the previous one does, whereas Thereof makes me think that they are basically shorthand instructions to the user. If I am correct, which one of you is right?

thanks
 
Old 03-10-2004, 02:53 PM   #5
aaa
LQ Guru
 
Registered: Jul 2003
Location: VA
Distribution: Slack 10.1
Posts: 2,194

Rep: Reputation: 47
When a proram executes successfully, it gives the value '0' to the os to show that it did. If it gives something else, there was an error.
'&&' is the logical AND. It works like this:
true && true = true
true && false = false
false && true = false
Let's say the 0 a program returns to the os is 'true', and anything else is 'false'. You have two programs, A and B:
A && B
If A is successful, A=true. If not, it is false. Say A failed. This would be the result:
false && true
Which means the operation overall failed. The computer is lazy, and doesn't even run program B, because it knows the result of 'false && true' is false no matter what B is.

Last edited by aaa; 03-10-2004 at 02:55 PM.
 
Old 03-11-2004, 01:18 AM   #6
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Quote:
Originally posted by timsch75
MasterC, you indicate that the && are used in a single string entered on the command line that the computer is to interpret as a sequence of events that are to occur if only the previous one does, whereas Thereof makes me think that they are basically shorthand instructions to the user. If I am correct, which one of you is right?

thanks
Just to be direct - && is entered on the command line (or in the code) and is also a general instruction to the user in docs. They can type it exactly, as MasterC indicates, or type it in sequence as Thereof says (logically equivalent, but more steps for the user) - but it's intended as a single command string. So they're both right - but MasterC is righter.
 
Old 03-11-2004, 06:23 AM   #7
samsbox
LQ Newbie
 
Registered: Mar 2004
Location: Telford, UK
Distribution: Red Hat 9
Posts: 13

Rep: Reputation: 0
Basically put: it means to do something then do something else when it has finished (i think :P)

e.g.

make && make install
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
zsnes && logitech dual action gamepad && dpad woes John5788 Linux - Games 5 10-29-2008 09:56 PM
(FreeBSD && Fedora Core 4 && Slackware 10.0) Filesystem Support taylor_venable *BSD 1 07-14-2005 02:24 PM
Japanese canna won't work : Warning: かな漢字変&am OrganicOrange84 Debian 3 06-30-2005 02:28 PM
Phục hồi dữ liệu bị mất???, cứ pollsite General 1 06-27-2005 12:39 PM
SuSE9 && Samba && Win2k DaFrEQ Linux - Software 2 01-27-2004 07:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration