1

I have an sh file which executes a php file. I'm trying to run it without using sh command. I want to run it using the command test.sh and not "sh test.sh".

How do I do that?

schuma
  • 47
  • 1
  • 4

1 Answers1

3

Add a hashbang as the first line of the script:

#!/bin/sh

Then set it as executable:

chmod +x test.sh

Then you should be able to run it with ./test.sh.

icktoofay
  • 126,289
  • 21
  • 250
  • 231