Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
| linux_essential [2017/04/19 08:42] – [Hello World in ''Bash''] admin | linux_essential [2017/04/19 08:52] (Version actuelle) – [File permissions] admin | ||
|---|---|---|---|
| Ligne 115: | Ligne 115: | ||
| </ | </ | ||
| - | < | + | < |
| #!/bin/bash | #!/bin/bash | ||
| Ligne 121: | Ligne 121: | ||
| </ | </ | ||
| + | ===== File permissions ===== | ||
| + | |||
| + | Files have properties: | ||
| + | |||
| + | * '' | ||
| + | * Three different types of user: '' | ||
| + | |||
| + | |||
| + | To take a script you have written and turn it into an executable program, | ||
| + | run “chmod +x” on it | ||
| + | |||
| + | <code bash> | ||
| + | $ ls -al | ||
| + | -rw-rw-r-- | ||
| + | </ | ||
| + | |||
| + | <code bash> | ||
| + | |||
| + | $ chmod +x hello.sh | ||
| + | |||
| + | </ | ||
| + | |||
| + | <code bash> | ||
| + | $ ls -al | ||
| + | -rwxrwxr-x | ||
| + | </ | ||
| + | |||
| + | **Execute the hello world script** | ||
| + | |||
| + | <code bash> | ||
| + | $ ./hello.sh | ||
| + | |||
| + | Hello World! | ||
| + | </ | ||
| + | |||