LinuxQuestions.org
Visit Jeremy's Blog.
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 05-12-2004, 09:31 AM   #1
trey85stang
Senior Member
 
Registered: Sep 2003
Posts: 1,091

Rep: Reputation: 41
; && -- questions... whats the diffrence??


can anyone explain the following to me....

When i compile something that takes multiple commands i do the following...

Code:
sh configure ; make ; make install
What is the diffrence between the above and the following

Code:
sh configure && make && make install &&
And while I am at it... what is /dev/null & what is it used for??

thanks
trey
 
Old 05-12-2004, 10:08 AM   #2
ranger_nemo
Senior Member
 
Registered: Feb 2003
Location: N'rn WI -- USA
Distribution: Kubuntu 8.04, ClarkConnect 4
Posts: 1,142

Rep: Reputation: 47
When using the semi-colons, all the commands will be run... If the make fails, the make install will still be run.

When using the double-ampersands, the following command will only be run if the preceeding command exitted without any errors... If the make fails, the make install won't be run.

/dev/null is a virtual device... Anything sent to it just disappears. It's used a lot when not wanting to see output from a program... my_script.sh > /dev/null
 
Old 05-12-2004, 01:32 PM   #3
trey85stang
Senior Member
 
Registered: Sep 2003
Posts: 1,091

Original Poster
Rep: Reputation: 41
Quote:
Originally posted by ranger_nemo
When using the semi-colons, all the commands will be run... If the make fails, the make install will still be run.

When using the double-ampersands, the following command will only be run if the preceeding command exitted without any errors... If the make fails, the make install won't be run.

/dev/null is a virtual device... Anything sent to it just disappears. It's used a lot when not wanting to see output from a program... my_script.sh > /dev/null
Awesome!! thank you for the info!
 
  


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
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
FYI: Ndiswrapper, Kernel-Source 2.6.9-4, Linux-2.6.10 && Couple O' Questions Outabux Debian 0 12-29-2004 03:13 PM
ATI && NVIDIA Tweaking, whats going on? Yerp Linux - Hardware 0 08-30-2004 03:04 PM
Diffrence nfs & telnet,ssh etc... tkmuthuvel Linux - Networking 2 08-03-2003 09:16 PM

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

All times are GMT -5. The time now is 10:08 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