fix: converted single to triple backticks11 (#36238)
This commit is contained in:
@@ -10,31 +10,36 @@ localeTitle: البرمجة النصية شل
|
||||
|
||||
1) قم بإنشاء الملف:
|
||||
|
||||
`$ touch myscript.sh
|
||||
`
|
||||
```bash
|
||||
$ 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
|
||||
`
|
||||
```bash
|
||||
$ 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
|
||||
`
|
||||
```bash
|
||||
$ echo "echo Hello World!" >> myscript.sh
|
||||
```
|
||||
|
||||
4) إعطاء وضع _تنفيذ_ الملف:
|
||||
|
||||
`$ chmod +x myscript.sh
|
||||
`
|
||||
```bash
|
||||
$ chmod +x myscript.sh
|
||||
```
|
||||
|
||||
5) قم بتنفيذها!
|
||||
|
||||
`$ ./myscript.sh
|
||||
Hello World!
|
||||
`
|
||||
```bash
|
||||
$ ./myscript.sh
|
||||
Hello World!
|
||||
```
|
||||
|
||||
يمكن العثور على مزيد من المعلومات حول نصوص shell [هنا](https://www.shellscript.sh/)
|
||||
Reference in New Issue
Block a user