cmds=( "ros2 launch rm_bringup rm_navigation_bringup.launch.py \localization:=amcl" ) for cmd in "${cmds[@]}"; do echo Current CMD : "$cmd" gnome-terminal -- bash -c "cd $(pwd); source /home/hfutsky/codes/24navigation/install/setup.bash;$cmd;exec bash;" sleep 0.2 done