On Wed, 2003-06-18 at 11:05, CrPy wrote: > Hi ng, > > I'm using linux for many years, but there is a concern I have never solved. > > Assuming, I have a command running in my nice bash shell and I do not know, > how long it will run. Now, I like to append an additional command , which > starts running after the first command has finished. How can I do this? Or is > it possible to do this at all? - After all it is Open Source ;-) > > Here us an simplified example of what I want to do: > # sleep 1000000h > > How long will it run? OK, I know it. But now, I like to halt my maschine after > the command has finished. And actually what I really want to have is this: > # sleep 1000000h; halt > > Can I somehow extend the command line, after sleep is already running? > > THX > > /CrPy
Use && instead of the ; Example first_command && command_to_run_after_first_is_finished Notice the double &&, a single & will fork the process into the background and then run the next, the double && will run the first command and when it is done, error free, run the second command, Jayson Garrell -- [EMAIL PROTECTED] mailing list