Script do start 2 programs

About writing shell scripts and making the most of your shell
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Locked
FidbecK

Script do start 2 programs

Post by FidbecK »

I want to start two programs Apache and MySQL.
Can I create a script to start those two programs instead of going to the Terminal and start one and than the other.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
FidbecK

Script to start two programs at once

Post by FidbecK »

Hi there

I want to create a script in Nadia to start 2 programs at once.
How do I do that?
Thanks
User avatar
xenopeek
Level 25
Level 25
Posts: 29504
Joined: Wed Jul 06, 2011 3:58 am

Re: Script to start two programs at once

Post by xenopeek »

Split from http://forums.linuxmint.com/viewtopic.php?f=90&t=91155 and moved here. See the forum rules; new questions deserve new topics and don't reply to support requests older than six months. Thanks :)

Depends on what you mean. Assuming you want to start a program Foo and a program Bar from one script, find how you would start the programs from the command line and then write a script such as:

Code: Select all

#!/bin/bash

(foo </dev/null &>/dev/null &)
(bar </dev/null &>/dev/null &)
You can find how you would start the programs from the command line by looking at the entry in your menu (at least on Cinnamon and MATE you can edit menu entries to look at what command is run for starting the applications).
Image
norm.h
Level 5
Level 5
Posts: 690
Joined: Tue Mar 23, 2010 11:45 am
Location: Oxfordshire, UK

Re: Script do start 2 programs

Post by norm.h »

Have a look here: http://forums.linuxmint.com/viewtopic.php?f=42&t=86813
Item 1b.
Is this what you're looking for?
Locked

Return to “Scripts & Bash”