The && command

Hi,

As you know its possible to use the `&&` command for execution for another command after the first one finish. For example make buildworld && make buildkernel...

However is there a way to accomplish this once the buildworld command has already been started, and spewing text?

//Business_Woman
 
Type (in the blind, in the shell running the make process):

Code:
[B]bash[/B]:
if [ $? == 0 ]; then make buildkernel; fi

[B]sh[/B]:
if [ $? = 0 ] ; then make buildkernel; fi
 
You mean like, append another command while buildworld is already running?

In the tcsh shell it works like this:

  • You press CTRL-Z, this will stop the current process.
  • Then you use the [cmd=]fg[/cmd] command to continue it and append something to it. E.g. [cmd=fg]1 && shutdown -p +3[/cmd]
 
I type blind commands through a storm of screen output quite a lot ;) I usually do not stop major make operations like that, because they spawn all kinds of sub-processes which may not respond favourably to a foot on the brakes in the main process.
 
The OP wants to run a command depending on the successful exit status of the command that's already running. That needs to be done in the same shell, i.e. in the same console.
 
Back
Top