shell - Effects of comment (#) lines before and/or after the comment-like #!/bin/sh line -
example one
#!/bin/sh # purpose: print out current directory name , contents pwd ls
example two
# purpose: print out current directory name , contents #!/bin/sh pwd ls
what difference – if make first line comment(#
), #!/bin/sh
second line, happen?
what meaning of #!/bin/sh
?
what difference between 1st & 2nd shell scripts..?
no difference in output. time execute both little different interpreter reads line 1 one.
if give comment(#) in 1st line after #!/bin/sh in 2nd line happen ?
any line started (#) except shebang(#!) treated comment in shell script.
what meaning of #!/bin/sh ?
its path(here - /bin/sh) interpreter used after shebang (#!) . shell try use interpreter language mentioned after shebang execute script.
Comments
Post a Comment