A Simple Linux Shell Script To Display Public IP Of PC

using nano text editor to make linux shell scripts
Linux shell scripts are useful for a lot of tasks. A brief tutorial on them can be found here. Here is a very simple shell script that on executing will display the public IP address of PC. Using any text editor (nano in this example), make the script as follows : #!/bin/bash echo "The Public IP for this system is : " curl -s icanhazip.com What this script does is simply fetch the public...

Linux Mint / Ubuntu Shell Script To Fix Problem with MergeList /var/lib/apt/lists”

To avoid typing in the same set of commands, shell scripts can be great. Here is a simple shell script that will run the commands that are used to fix the mergelist errors in Ubuntu / Linux Mint which prevents any updates from running. Check out the related post here. [Note : If you have already fixed the errors, don’t run this script as it will start from scratch and re-run the update process....

A Simple Linux Shell Script To Test Internet Connectivity

If you have been following the Linux shell scripting primer so far, you would have seen that most of the things that go in a shell script are the daily Linux Terminal commands. Here is a demonstration of one such command : Let us have a shell script which will ping a specific standard website and let us know if it is reachable or not. In fact you can use this as a basic test to check for internet connectivity. Shell...

Linux Mint Shell Scripting Primer : Part IV

[ This is a five part series that covers the very basics of Linux shell scripting. For the very beginning, start from Part I here.] In the previous part, we had seen how to use system as well as user defined variables in shell scripts. This part will cover something really really cool and useful by discussing loops.You will see how useful they can be when used. Loops do what they mean. Check for some...

How To Make Linux Mint Shell Script To Run HJSplit

One of the earlier posts described how to install and run HJSplit in Linux Mint / Ubuntu. Here is a simple Linux shell script which launches HJSplit everytime when it is executed (for understanding the basics of Linux shell scripts, this is a post to look at): What the above script does is nothing but save the command that is used to run HJSplit. Save the script and make it executable with chmod a+x...

Linux Mint Shell Scripting Primer : Part II

[ This is a five part series that covers the very basics of Linux shell scripting. ] In the previous part, we had seen the basic structure of a Linux shell script, how to make it executable and then run it. This part will cover how to output relevant text messages and make the shell scripts more user friendly. Just to make the script of previous part (which simply displayed the computer name using...