Looping. For Loops In the previous post we took a look at looping, in the Bash scripting section. We looked at one line for loops, which I'm hoping you went ahead to practice on your own and you are familiar with. We're going to be looking at that but in Python and also while loops, … Continue reading Python. (Part 4)
Tag: Terminal
Scripting with Bash.
For this we would be writing a small ping sweeper script. Sending out a ping and getting information back that the ping was valid. To know which machine responds to the ping, we need to: Identify what a valid ping looks like.Use grep to extract specific line of information from the valid ping result.Use cut … Continue reading Scripting with Bash.
Python. (Part 3)
Boolean Expressions. A Boolean expression is a logical statement that is either true or false. The above image has 4 bool statements. For bool2, 3 * 3 is equal to 9, which is true but bool4 means that 3 * 3 is not equal to 9, which is obviously false. In layman terms, boolean expressions … Continue reading Python. (Part 3)
Python. (Part 2)
In this post, we'll be looking at Variables, Methods & Functions. Alright! We are going to start building off on scripts, for now, we'll keep it all in one until we need to create new ones. As always, I went ahead and called mine, script.py, yours can be called anything you'd like and don't forget … Continue reading Python. (Part 2)
Introduction to Linux. (part 2)
Viewing, creating and editing files. We already looked at the echo command, and if you recall, the echo is used to create a file. We can use echo to write to a file.cat command prints out to the screen what is in a file.To append a file: echo "text to add" >> nameofthefile.txt The above … Continue reading Introduction to Linux. (part 2)