Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shebangの説明が間違っている #14

Open
znz opened this issue Sep 6, 2021 · 0 comments
Open

shebangの説明が間違っている #14

znz opened this issue Sep 6, 2021 · 0 comments

Comments

@znz
Copy link

znz commented Sep 6, 2021

https://fjord.jp/kuroigamen/8.html

shebangは何なのかというと、

「"黒い画面"で実行しようとしたファイルの1行目の最初の二文字が#!だったら、その後に書いてあるコマンドに2行目以降の全てを渡す」

という機能です。

という説明がありますが、間違っているので修正をお願いします。

たとえば以下のようなファイルを作成して実行してみるとわかると思いますが、shebang のコマンドに渡されるのは実行ファイルのパスだけで、中身が渡されるわけではありません。

$ cat ./foo
#!/bin/echo arg
$ ./foo bar
arg ./foo bar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant