Here is a simple menu based Linux shell script that uses mainly the commands “ifconfig” and “uptime” to :
List all the available network interfaces on the system (like wired adapter/eth0, wireless adapter/wlan0 and so on).
List all the information about each of the available network interfaces (like local IP address, subnet mask, if interface is up or down etc.)
Show how...
Here is a useful bash shell script which uses a menu driven user input and will display the following info :
Your computer name
List of users who have logged in
Total disk space usage
List of files and folders in your home directory.
Think of it as the automated response system (press 1 for A, press 2 for B and so on).
Here is the code (script is named as info.sh) :
#!/bin/bash
# A simple menu...
Apr 19th, 2011 · Comments Off on 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...