John Oliver wrote:
> On Thu, Mar 22, 2007 at 05:52:59PM -0700, Lan Barnes wrote:
>> On Thu, March 22, 2007 5:50 pm, Lan Barnes wrote:
>>> On Thu, March 22, 2007 2:08 pm, John Oliver wrote:
>>>> On Thu, Mar 22, 2007 at 01:51:35PM -0700, James G. Sack (jim) wrote:
>>>>> It appears that you  didn't grasp the significance of what Greg said
>>>>> about the '&&' separating your commands.
>>>>>
>>>>> If you want to:
>>>>>   try A, and then if that works try B, and then if that works try C
>>>>>   use
>>>>>     A &&
>>>>>     B &&
>>>>>     C
>>>>> if you want to:
>>>>>   try A, and then (always) try B, and then (always) try C
>>>>>   use
>>>>>     A
>>>>>     B
>>>>>     C
>>>> Ahhh!
>>>>
>>>> I thought the && would just move on to the next command after the
>>>> completion, not necessarily the successful completion, of the first
>>>> command.  And that's what I want... I want it to try to install libgcc
>>>> first, and only after that's complete, one way or the other, to move on
>>>> to the next RPM command.
>>>>
>> I think what you want is a semicolon:
>>
>>   $do_me ; then_do_me
> 
> For the record, Jim's suggestion (with no operators) worked.  I had
> thought that, with no operators, it would start to install one, and then
> immediately start the second without waiting for the first.  

The better term here is 'delimiter' (rather than 'operator').
And, actually, lb is right too. The semicolon delimiter is required in
context of multiple commands on a single line

  A; B; C;

In a context accepting multiple lines (eg, an else clause) you can say

 A;
 B;
 C;
or
 A
 B
 C

but semi's at EOL are optional (and redundant).


And, your expectation that commands might run in parallel, and you had
to explicitly force strictly sequential operation is kinda-backwards ;-)

If you want the shell to execute a command as a background process, then
you have to explicitly say so with an & (single-ampersand) delimiter.


> 
> Come to think of it, it might do that, since my VM image already had
> libgcc  I may need to install a system without the development libraries
> and try to install SWS and see if libgcc gets installed before
> libstdc++, or if libstdc++ will fail because libgcc isn't installed or
> showing up in the RPM database yet.
> 

Regards,
..jim


-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to