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
- 36,677
-
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
- 197,895
- 55
- 485
- 740

Emilio Galarraga
- 276
-
1You need
&
at the end ofgnome-terminal
command, otherwise the script will run sequentially, opening one window at a time – Sergiy Kolodyazhnyy Feb 16 '17 at 00:47 -