[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: |
adrelanos |
Subject: |
Re: [Help-bash] running in background, sleep and back to normal prompt |
Date: |
Sat, 16 Feb 2013 18:04:37 +0000 |
Chris Down:
> Hey,
>
> I'm not actually sure what behaviour you are wanting. If you want the
> prompt to reappear without having to press enter,
Yes.
> then you probably don't
> want to background it in the first place.
But I really want to. =)
> The reason it takes another newline to display the prompt again is because
> it is not redrawn automatically.
That's what I am asking. How to redraw it automatically?
> Can you show a mockup of how you want it to look?
Yes... Like...
/tmp/test $ ./test &
/tmp/test $
...
/tmp/test $
> How should it look if you already
> started running another process in the meantime (in the foreground), for
> example?
/tmp/test $ ./test1 &
/tmp/test $
test1 script
test1 script...
/tmp/test $
some more from test1 script
/tmp/test $ ./test2 &
test2 script
test2 script...
/tmp/test $
some more more from test1 script...
/tmp/test $
test1 script end
/tmp/test $
test2 script end
/tmp/test $
> 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
>>
>>
>