0

I'm kind of confused, I thought doing something like this would work :

#!/bin/bash

wget https://myscript.sh
chmod +x myscript.sh
exec gnome-terminal --tab --active --title="my title" -- myscript.sh

But running this returns :

error message in terminal

There was an error creating the child process for this terminal

Failed to execute child process "myscript.sh" (No such file or directory)

Removing exec doesn't work I also tried putting the file name in between $( ) and " ", I also tried putting the absolute path.

What am I doing wrong?

tatsu
  • 3,107

1 Answers1

0

The correct syntax is :

gnome-terminal --tab --active --title="my title" -- "/tmp/myworkdir/myscript.sh"

having an absolute path will allow for the file to be run.

make sure to makes all your file operations happen in this same directory.

tatsu
  • 3,107