Changes

Jump to: navigation, search

OPS245 Scripting Exercises dev

428 bytes added, 21:53, 10 January 2023
no edit summary
Both of the above commands will work. However, the first one gives execute permission to user, groups and other (in otherwords '''everyone'''). This is not the most secure way of allowing your scripts to be executed. The second one is a much better practice, which will give only your user execute permission.
=== $PWD and pwd, what is the difference? ===
$PWD is an environment variable that contains the path to your present working directory as an '''absolute path'''. pwd is a command that lists your present working directory, as an '''absolute path'''.
* What your === Exit codes and $PWD ? ===$? is, pwd a special variable that contains the exit code of the last executed command* Check . Linux uses an exit code of 0 to represent success. Any non-zero value represents failure. To check the exit status of the return code from a last command by examining use '''echo $?'''.
== Variables ==

Navigation menu