Project information

  • Category: Virtual Machine & Linux
  • Program Language: Script
  • Project date: Feb 17, 2022
  • Project URL: Link

Scripting

Scripting in Linux is a crucial aspect for automation and executing repetitive tasks. Recently, I worked on a scripting exercise that allowed me to apply my knowledge.


In Script 1, I created a script that takes input for the number of executions and the IP or domain to ping, and performs the ping command, displaying the results on stdout. This provided a straightforward way for me to check the connectivity of a specific machine or domain.


Moving on to Script 2, I introduced a choice in Script 1. Now, I can decide whether to print the results on stdout or save them to a file. In the case of saving to a file, I also added the option to choose whether to append the results to an existing file or overwrite it completely. This flexibility allows me to tailor the script to my specific needs. Tackling these scripting exercises has provided me with a deeper understanding of the capabilities and possibilities offered by scripting in Linux. It has also helped me develop skills in using variables, decision structures, and output operations. I will continue to further explore scripting in Linux to automate tasks and enhance the efficiency of my activities.