Kontent qismiga oʻtish

Shebang (Unix)

Vikipediya, ochiq ensiklopediya
shebang

Hisoblashda shebang - satr avvalida panjara va undov birga yoziladigan unix uslubiyati (#!). Shuningdek, u o'tkir undo, sha-bang,[1][2] hashbang,[3][4] pound-bang,[1][5] yoki hash-pling deb ham ataladi.[6][7]

Shebang bilan matn faylini Unixga oid operatsion tizimda ishga tushirishda, dastur yuklovchi mexanizm faylning qolgan boshlang'ich satrini tarjimon yo'l-yo'riq sifatida tahlil qiladi. Yuklovchi belgilangan tarjimon dasturini bajaradi va dastlab skriptni ishga tushirishga harakat qilish paytida foydalanilgan yo'lni argument sifatida unga o'tkazadi, shunda dastur faylni kirish ma'lumotlari sifatida ishlatishi mumkin. [8] Masalan, agar skript yo'l path/to/script bilan belgilangan bo'lsa va satr #!/bin/sh/bin/sh shaklida boshlansa, dastur yuklovchiga dasturi /bin/ish, o'tish yo'li /to/script birinchi argument sifatida ishga tushirish uchun qoʻllanadi.

  1. „Advanced Bash Scripting Guide: Chapter 2. Starting Off With a Sha-Bang“. 2019-yil 10-dekabrda asl nusxadan arxivlangan. Qaraldi: 2019-yil 10-dekabr.
  2. Cooper, Mendel. Advanced Bash Scripting Guide 5.3 Volume 1. lulu.com, 5 November 2010 — 5-bet. ISBN 978-1-4357-5218-4. 
  3. MacDonald, Matthew. HTML5: The Missing Manual. Sebastopol, California: O'Reilly Media, 2011 — 373-bet. ISBN 978-1-4493-0239-9. 
  4. Lutz, Mark. Learning Python, 4th, O'Reilly Media, September 2009 — 48-bet. ISBN 978-0-596-15806-4. 
  5. Lie Hetland, Magnus. Beginning Python: From Novice to Professional. Apress, 4 October 2005 — 21-bet. ISBN 978-1-59059-519-0. 
  6. Guelich, Gundavaram and Birznieks, Scott, Shishir and Gunther. CGI Programming with PERL, 2nd, O'Reilly Media, 29 July 2000 — 358-bet. ISBN 978-1-56592-419-2. 
  7. Schitka, John. Linux Guide to Linux Certification. Course Technology, 24 December 2002 — 353-bet. ISBN 978-0-619-13004-6. 
  8. „execve(2) - Linux man page“. Qaraldi: 2010-yil 21-oktyabr.