I'm trying to execute multi commands in gnome-terminal? I came across an example as the below,
sudo gnome-terminal --window --wait --tab --active --geometry=120X60 \
--title="$1" --working-directory="$code_directory"\
-- bash -c "$file_path; exec bash"
It only works one command.
If I want to execute multiple command in step by step, for example "cd /home"
and then execute "make"
then something
.. What am I supposed to do?
$file_path; exec bash
are two commands though, so what do you mean byIt only works one command.
?sudo gnome-terminal
, which is told to runbash -c
with the argument"$file_path; exec bash"
. The command$file_path
will run first insidegnome-terminal
, then the commandexec bash
will run inside the samegnome-terminal
. So you are running "multiple commands" "one by one" already. If you are expecting something different, please be descriptive in what you are trying to accomplish.