I want to open multiple terminal windows (20 to be specific) through a bash script. Can someone help ?
Asked
Active
Viewed 1.0k times
3 Answers
4
This little script should be helpful:
#!/bin/bash
for i in {0..19}
do
xterm &
done
Explanation:
{0..19}: number range from 0 to 19 to give total of twentyxterm &: opens terminal and allows you to detach from the original terminal
George Udosen
- 35,970
- 13
- 99
- 121
-
Yes it's automatic.. – George Udosen Feb 15 '17 at 22:48
4
Another script
#!/bin/bash
for i in `seq 1 20`;
do
gnome-terminal
done
muru
- 193,181
- 53
- 473
- 722
Emilio Galarraga
- 266
- 3
- 9
-
1You need `&` at the end of `gnome-terminal` command, otherwise the script will run sequentially, opening one window at a time – Sergiy Kolodyazhnyy Feb 16 '17 at 00:47
-
3
Try gnu parallel:
parallel -j20 gnome-terminal ::: {1..20}
Phillip -Zyan K Lee- Stockmann
- 2,303
- 12
- 26