> >No, && is the logical AND. When it's between two commands, the second > >is executed only if the first succeeds. I don't understand why you > >used it since you don't know what it does. > > That's what I thought it does. And that's why I used it. I put it at > the end of all commands so that if any of them failed I would know > about it.
I concur with Pierre(?) that you should study the Advanced Bash Scripting page, and having the O'Reilly "Learning the Bash Shell" book within arm's reach, as I have ;) , is always a good idea. Go play around with it in various ways until you really understand it. It CAN be^H^H^H^H^H^H IS very tricky to use! It can't be on the last statement of a clause, for example. > > What I don't really understand is how this then causes variables to go > out of scope. Exactly. Do "ps ax", you'll see it has its own PID. It's running in a subshell! Subshells inherit, but never pass back but a "return code". "Source" runs in the same shell, running a script or (non-built-in) command runs in a subshell. In all seriousness and good intentions, I do recommend you stop and take the time to really study the bash shell. It'll save you time and trouble in the end! It won't be a waste of your time! Trust me. -- Paul Rogers paulgrog...@fastmail.fm Rogers' Second Law: "Everything you do communicates." (I do not personally endorse any additions after this line. TANSTAAFL :-) -- http://www.fastmail.com - Same, same, but different... -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style