How do you give execution permission on a bash script so you can run it?

Hương Trang

New member
How do you give execution permission on a bash script so you can run it?
Answer
You have two choices:
  1. Run it as an argument to bash: bash /var/www/script.
  2. Alternatively, set the execute bit: chmod +x /var/www/script. And, now you can execute it directly: /var/www/script.
 

Tìm kiếm

Back
Top