Friday, April 26, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 1691  / 2 Years ago, tue, february 1, 2022, 2:02:57

I'm trying to get bash to execute two commands simultaneously. I've read a little about job control, &, bg, fg, but the problem is that the command I want to run doesn't run properly in the bg.



Specifically, I'm trying to get two movie files to start running simultaneously in mplayer (to compare the two).



$ mplayer [file1] & mplayer [file2] & 


doesn't work.


More From » video

 Answers
7

Have you tried writing a script that performs that performs this kind of task?



Here is a simple one.



#!/bin/bash

mplayer [file1] &
mplayer [file2] &

[#35653] Tuesday, February 1, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
termetalli

Total Points: 326
Total Questions: 127
Total Answers: 110

Location: Sao Tome and Principe
Member since Sat, Sep 12, 2020
4 Years ago
;