Hızlı yanıt: kod örneği
stackoverflow.com bash-script-what-does-bin-bash-mean
That is called a shebang, it tells the shell what program to interpret the script with, when executed.In your example, the script is to be interpreted and run by the bash shell.Some other example shebangs are:(From Wikipedia)and a few additional ones I can think off the top of my head, such as:In a script with the bash shebang, for example, you would write your code with bash syntax; whereas in a script with expect shebang, you would code it in expect syntax, and so on.Response to updated portion:It depends on what actually points to on your system. Often it is just a symlink to . Sometimes portable scripts are written with just to signify that it's a shell script, but it uses whichever shell is referred to by on that particular system (maybe it points to , or )
#!/bin/sh — Execute the file using sh, the Bourne shell, or a compatible shell#!/bin/csh — Execute the file using csh, the C shell, or a compatible shell#!/usr/bin/perl -T — Execute using Perl with the option for taint checks#!/usr/bin/php — Execute the file using the PHP command line interpreter#!/usr/bin/python -O — Execute using Python with optimizations to code#!/usr/bin/ruby — Execute using Ruby
#!/bin/ksh#!/bin/awk#!/bin/expect
/bin/sh
/bin/bash
#!/bin/sh
/bin/sh
/bin/bash
/bin/ksh
/bin/zsh