3

I want to open multiple terminal windows (20 to be specific) through a bash script. Can someone help ?

3 Answers3

4

This little script should be helpful:

#!/bin/bash

for i in {0..19}
do
    xterm &
done

Explanation:

  1. {0..19}: number range from 0 to 19 to give total of twenty

  2. xterm &: opens terminal and allows you to detach from the original terminal

George Udosen
  • 36,677
4

Another script

#!/bin/bash
for i in `seq 1 20`;
  do
  gnome-terminal
done 
muru
  • 197,895
  • 55
  • 485
  • 740
3

Try gnu parallel:

parallel -j20 gnome-terminal ::: {1..20}