Open main menu

CDOT Wiki β

Changes

OPS245 Scripting Exercises dev

28 bytes added, 10:25, 15 January 2023
Running scripts from your current directory or another directory or a directory in the $PATH
You can run a script from your current directory with ./ followed by the script name (without a space). I.E. '''./script.bash''' or '''./script.py''' Alternatively, if the script is in a directory that is specified in your $PATH environment variable you can execute the script by simply typing the name of the script without the ./. You can view your $PATH variable by issuing the command '''echo $PATH'''.
Since the scripts in our course are all located in /home/username/bin, (which is part of our $PATH) you can execute them without the preceding ./
== Script Permissions ==