help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] running in background, sleep and back to normal prompt


From: Chris Down
Subject: Re: [Help-bash] running in background, sleep and back to normal prompt
Date: Sat, 16 Feb 2013 14:35:53 +0800

Hey,

I'm not actually sure what behaviour you are wanting. If you want the prompt to reappear without having to press enter, then you probably don't want to background it in the first place. How should it look if you already started running another process in the meantime (in the foreground), for example?

The reason it takes another newline to display the prompt again is because it is not redrawn automatically.

Can you show a mockup of how you want it to look?

Best,

Chris



On 16 February 2013 00:40, adrelanos <address@hidden> wrote:
Hi!

Legend: _ is used to symbolize an empty line

Smallest possible example script:

#!/bin/bash
sleep 1
echo ...

Running it...

./test &

Will result in.

/tmp/test $ ./test &
[2] 32420
/tmp/test $ ...
_

After pressing <enter>.

[2]+  Done                    ./test
/tmp/test $

Questions:

How can I get ride of the "[2] 32420"?

How can I get ride of the "[2]+  Done                    ./test"?

How can I get back to the normal prompt, for example "/tmp/test $" with
requiring to press enter?

Cheers,
adrelanos



reply via email to

[Prev in Thread] Current Thread [Next in Thread]