Bash script is waiting to open second file in gedit until I close the first one

23 Views Asked by At

I wrote a simple bash script to create and open two files

#!/bin/bash  

mynewdate="$(date '+%d-%m-%Y')"
cd /my/path/
echo "praparing files..."

pilot="pilot-mode-"${mynewdate}
echo $pilot
touch $pilot
cat pilot-mode-schema >> $pilot
gedit $pilot

cd distractions
distratcions="distractions-"${mynewdate}
echo $distratcions
touch $distratcions
cat distractions-schema >> $distratcions

gedit $distratcions

but when I open the first one

gedit $pilot

it opens and the second one opens only after I close the first one.

How can I change the script to open two files at once?

I was trying to look for similar answers on askubuntu and other places but with no luck

and also tried adding ; sign at the end of line, still the same.

0

There are 0 best solutions below