Search code examples
linuxbashshellshkde-plasma

Warning: Could not start program with arguments. Warning: Exec format error


Hello I'm trying to make a Shell script in opensuse to create MySqlUsers but when I try to run it I get this error:

Warning: Could not start program '/home/thomas/Scripts/MySqlCreateUser.sh' with arguments '/home/thomas/Scripts/MySqlCreateUser.sh'.

Warning: Exec format error

Any Idea what I can do?


Solution

  • I'm guessing you are trying to start this from a KDE menu item.

    You need to make sure that:

    1. Your script has a proper shebang on the first line (like #!/bin/bash)
    2. Your script is executable (chmod +x /home/thomas/Scripts/MySqlCreateUser.sh)