Lab Scripting 2 - echadbourne/ChadbourneSYS-140 GitHub Wiki

Summary:

  • In this lab we used Kali Linux to explore some more scrips. We created a script in bash, used a few scripts that were made by other people in bash, then also ran a python script that does something else and learned how to direct the computer to run a file that is not in bash.
  • Bash scripts had .sh at the end, and python scripts had .py at the end

Useful Information:

  • In order to run a bash script, you needed to use the whole file path (the file needed to also be authorized to run as a program, and closed out of mousepad) like so: /home/kali/Desktop/script.sh
  • In order to run a python file, we needed to put something else in front of it (and all of the other things mentioned before) like so: python3 /home/kali/Desktop/translator.py
  • It is also important to note that capitalization matters in linux, so things like "Desktop" that are capitalized need to stay that way when you are running the command, unlike Windows.