How to write ctrl+z,bg commands in sequence in bash script

Alan Pope alan at popey.com
Mon Aug 22 07:20:55 UTC 2011


On 22 August 2011 08:18, Amrit Pal Pathak <amritpalpathak1 at gmail.com> wrote:
>  I want to use ctrl+z ,bg commands in a sequence in my script.Can anyone
> please tell me how i can do it.?

Stick an ampersand at the end of the line you want to background. Like this:-

#!/bin/bash
command_one &
command_two

First command one will kick off and immediately go into the background
then command two will start.

Al.




More information about the ubuntu-users mailing list