narcissus نوشته است:moslem.b نوشته است:
خوب یه سوال هم خودم دارم چرا توی بعضی از اسکریپت ها بجای اون خط اول که نوشته bin/sh/!# مینویسن bin/bash/!#
در این رابطه اینو دیدم به نظرم جالب امد :
- کد: گزینش همه
Some typical interpreters for shebang lines:
* #!/bin/bash — Execute using the Bourne-again shell
* #!/bin/bash -c '/bin/bash' — Execute using bash in the /bin/ directory, and calls bash inside the /bin/
* #!/bin/csh — Execute using csh, the C shell
* #!/bin/ksh — Execute using the Korn shell
* #!/bin/awk -f — Execute using awk program in the /bin/ directory; the -f is necessary; otherwise awk will think its argument is the awk program itself rather than a file that contains it
* #!/bin/sh — On some systems, such as Solaris, this is the Bourne shell. On Linux systems there is usually no Bourne shell and this is a link to another shell, such as bash. According to the Single UNIX Specification's requirements for /bin/sh, such a shell will usually mimic the Bourne shell's behaviour, but be aware that using #!/bin/sh in shell scripts may invoke different Bourne-compatible shells on different systems.
* #!/bin/zsh — Execute using zsh, the Z shell
* #!/usr/bin/perl — Execute using Perl
* #!/usr/bin/php — Execute using PHP. Note: since in PHP the shebang line falls outside the "code block" (<?php ?>), it doesn't act as a comment, so PHP must explicitly ignore it.
* #!/usr/bin/python — Execute using Python
* #!/usr/bin/lua — Execute using Lua
* #!/usr/bin/env — Invocation of some other program using env program in /usr/bin directory
* #!/usr/bin/ruby — Execute using Ruby
* #!/usr/bin/tclsh — Execute using Tcl
* #!/usr/bin/emacs --script — Execute using Emacs, need Emacs 22.
http://en.wikipedia.org/wiki/Shebang_(Unix)
0A7:لینک اگر داخل url قرار نگیره ممکن درست اجرا نشه
سلام
با توجه به پستی که داده شد لازم شد اینرو هم بگم که مفسر شما میتونه مفسر یک زبان برنامه نویسی یک ادیتور یا یک پوسته و.... باشه
برای مثال پوسته هایی مثل ash,csh,zsh,tcsh,....
زبان های برنامه نویسی ,awk,perl,peython,ruby,......
ادیتور مثل nano,emacs,vi,.....
و خیلی چیز های دیگه باید ببینی به چه چیزی نیاز داری
موفق باشید
یا علی