fix(guide): simplify directory structure

This commit is contained in:
Mrugesh Mohapatra
2018-10-16 21:26:13 +05:30
parent f989c28c52
commit da0df12ab7
35752 changed files with 0 additions and 317652 deletions

View File

@@ -0,0 +1,40 @@
---
title: Shell scripting
localeTitle: البرمجة النصية شل
---
# البرمجة النصية شل
في سطر الأوامر ، برنامج نصي shell هو ملف قابل للتنفيذ يحتوي على مجموعة التعليمات التي ستنفذها shell. انها الهدف الرئيسي لخفضه مجموعة من التعليمات (أو الأوامر) في ملف واحد فقط. كما يمكن التعامل معها بعض المنطق لأنه لغة برمجة.
## كيفية إنشائه
1) قم بإنشاء الملف:
`$ touch myscript.sh
`
2) إضافة [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) في بداية الملف. خط Shebang مسؤول عن السماح لمترجم الأوامر بمعرفة أي مترجم سيتم تشغيل البرنامج النصي shell مع:
`$ echo "#!/bin/bash" > myscript.sh
# or
$ your-desired-editor myscript.sh
# write at the first line #!/bin/bash
`
3) إضافة بعض comands:
`$ echo "echo Hello World!" >> myscript.sh
`
4) إعطاء وضع _تنفيذ_ الملف:
`$ chmod +x myscript.sh
`
5) قم بتنفيذها!
`$ ./myscript.sh
Hello World!
`
يمكن العثور على مزيد من المعلومات حول نصوص shell [هنا](https://www.shellscript.sh/)