0

I would like to ask you the differences between the following ways in script execution.

.  script.sh

./ script.sh

../script.sh

. ./script.sh

Thank you in advance.

Regards,

Barmar
  • 741,623
  • 53
  • 500
  • 612
  • Stack Overflow questions should be about a _specific problem you actually face_. Surely if you've tried them you know already what works and what doesn't? `help .` will also be useful in terms of telling you what the dot command does; the POSIX specification for same is also at https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_18 – Charles Duffy Jan 29 '21 at 21:23
  • `./ script.sh` is meaningless. `./` means to execute the current directory as a program. – Barmar Jan 29 '21 at 21:25
  • Did you mean to write `./script.sh` there? – Barmar Jan 29 '21 at 21:26
  • ...beyond that, Stack Overflow is specifically for questions about writing code; end-user questions about using your shell are a better fit for [unix.se]. What `../` means is definitely in that category. – Charles Duffy Jan 29 '21 at 21:26

0 Answers0