0

I mean if I just use bash to run the file like bash ./myscript.sh will it be enough or there are some pitfalls?

8
  • If you call it like that, you don't need to make it executable. Apr 16, 2019 at 8:42
  • @StefanHamcke so there is no difference between making it executable and run by ./myscript.sh or run it explicitly by calling bash ./myscript.sh, right? Apr 16, 2019 at 8:45
  • This depends on the shebang.
    – pLumo
    Apr 16, 2019 at 8:49
  • @RoVo the shebang is #!/bin/bash Apr 16, 2019 at 8:51
  • And what does type bash say. If it's the same, there will be no difference. Or if you run /bin/bash myscript.sh.
    – pLumo
    Apr 16, 2019 at 8:52

0

Browse other questions tagged .