Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 1848  / 2 Years ago, sun, march 27, 2022, 9:44:53

I would like to open multiple instances of the same file with some sort of command. I've tried some very unsophisticated ideas (e.g., an alias or function in my .bashrc, a simple shell script), but they all open the file once, then open another instance after i close the first open file).



I know it's not a big deal to simply type an aliased command four (say) times, but it must be dead easy to write a command that would call, e.g.,



mupdf /path/to/file/file.pdf


four times so the file is opened four times all at once..?


More From » bash

 Answers
4

It sounds like that your approach is using sequential invokation of the commands. You need to start the programs in the background. In bash (use your own program instead of the fictional 'openpdf'):



$ openpdf something.pdf &
[1] 1234
$


The & symbol tells bash to launch the program in the background. You can type in other commands while the other program is running. If you repeat this n times then it will be launched n times. Learn more about job control in bash by consulting the manual.


[#40516] Monday, March 28, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
huovie

Total Points: 234
Total Questions: 99
Total Answers: 105

Location: Central African Republic
Member since Sun, Feb 26, 2023
1 Year ago
huovie questions
Mon, Aug 2, 21, 01:46, 3 Years ago
Thu, Feb 2, 23, 10:58, 1 Year ago
Thu, Oct 21, 21, 08:55, 3 Years ago
Sun, Dec 5, 21, 23:57, 2 Years ago
;