My useful system information script for any Linux user who wants quick system information.

This is a system information script I am working on. This shows some useful information about your Linux system. #!/bin/bash   echo " My System information script." echo " " echo " "   echo "The computer has: $(awk < /proc/meminfo ‘{ if ($1 == "MemTotal:") { print $2 }}’) Kilobytes of RAM." echo "The … Read more

How to use the ping command in a script to get an IP address automatically and ping it.

This command will get the IP address from the interface supplied and then ping it. ping $(ifconfig enp6s1 | awk ‘/inet / { print $2 } ‘ | sed -e s/addr://)ping $(ifconfig enp6s1 | awk ‘/inet / { print $2 } ‘ | sed -e s/addr://) Here is an example. This shows how well this … Read more

A script I wrote that checks whether a host is reachable by various protocols like ICMP & TCP.

A nice script that will check if a host is up or not. #!/usr/bin/perl   use warnings; use strict;   use Net::Ping;   # code source: http://www.perlmonks.org/?node_id=943892 # More: http://stackoverflow.com/questions/3960595/how-can-i-ping-a-host-with-a-perl-one-liner-with-netping   #$| = 1; print "Please type a host to check: -:\n"; my $host = <>; #Reading input from STDIN.   if (length($host) < 3) … Read more

Networking script I am working on. This prints some information about your machine.

This Perl script will print some information about your networking set-up on your Linux machine. #!/usr/bin/perl   use warnings;   $iface = "eth0";   @data = `ifconfig`;   $net = $data[1];   $kernel = `uname -r`;   printf("\n*————————————-*\n");   printf("The IP of %s is:%s\n", $iface, $net); printf("The kernel version is: %s\n", $kernel);   printf("\n*————————————-*\n");#!/usr/bin/perl use … Read more

Cool BASH script that I thought I would share. Print out all of the BASH colors.

This is a BASH shell script that will print all of the available colors using the BASH shell. The colors are useful for colorizing your BASH prompt to differentiate it from your shell output. #!/bin/bash   # colors.sh – Print out all the different ECMA color-mod combos # # 2008 – Mike Golvach – [email protected]Read more