ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
2.)
2 refers to 'stderr'
> is redirection
1 is 'stdin'
& (in this context) is like addressof or whereabouts.
so this says: redirect stderr to where ever the hell stdin is headed. In this case both stdin and stderr are going to /dev/null so you'll never see any output
3.) I forget. again, man bash
4.) && is logical 'and'. I don't see what it'll do here, but it's like ./configure && make (configure and make, but don't make if configure fails).
all of these are answered in man bash. please check it out.
1) As far as I can make out from "man bash", -p stops bash reading a users startup files
2) 2>&1 means ouput the error stream to the standard output (the standard output is then ouptu to the file as has been specified)
3) $? contains the exit status of the last command
4) && means that the command will wait to be completed before continuing.
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152
Rep:
Quote:
Originally posted by david_ross
4) && means that the command will wait to be completed before continuing.
Just to be pendantic. . . && means will wait for SUCCESSFULL completion before continuing (i.e. exit status of 0). ;; means will wait for completion before continuing (any exit status).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.