Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Ubuntu User (http://www.linux-archive.org/ubuntu-user/)
-   -   How to write ctrl+z,bg commands in sequence in bash script (http://www.linux-archive.org/ubuntu-user/566797-how-write-ctrl-z-bg-commands-sequence-bash-script.html)

Amrit Pal Pathak 08-22-2011 07:18 AM

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

*I want to use ctrl+z ,bg commands in a sequence in my script.Can anyone please tell me how i can do it.?
*I just want to run a process in background and then in the same terminal i have to run a new process.

--
Thanks
Regards
Amrit Pal
amritpalpathak.blogspot.com

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

Alan Pope 08-22-2011 07:20 AM

How to write ctrl+z,bg commands in sequence in bash script
 
On 22 August 2011 08:18, Amrit Pal Pathak <amritpalpathak1@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.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


All times are GMT. The time now is 04:27 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.