This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Simple script to create a tar gzip archive of all directories inside the current directory excluding the shell file and removes the | |
#directory once archived | |
#!/bin/bash | |
#for i in `ls | awk '{print $0}'` | |
for i in `ls | grep -v zip.sh | awk -F. '{ print $1 }'` | |
do | |
tar -czvf $i.tar.gz $i/ | |
echo $? | |
rm -rf $i/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#To download a list of courses from LinuxAcademy through a simple script. | |
#go through | |
#Substitute /<download-directory>/<course-directory> with the path to download | |
#download Utility from https://github.com/vassim/linuxacademy-dl | |
#Substitute course IDs in the loop | |
#!/bin/bash | |
for i in 33 45 48 49 | |
do | |
mkdir /<download-directory>/<course-directory>/$i |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Simple RAID status check script for LSI MegaRAID cards | |
# Needs MegaCli installed. Install from https://docs.broadcom.com/docs-and-downloads/raid-controllers/raid-controllers-common-files/8-07-14_MegaCLI.zip | |
# Requires sendmail installed | |
# Create a cron job for auto checks | |
# Output format | |
# Degraded 1 | |
# Failed 1 | |
#!/bin/bash | |
STATUS=`MegaCli -AdpAllInfo -aALL -NoLog|egrep '^ (Degraded|Failed)'|grep -v ' 0'`; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Date 20/10/2017 , Version 1.0.1 | |
#Authors : Arun D, Nikhil Sasi | |
#Requirements : CentOS installed | |
#Note : Not coded for checking Hardware RAID arrays | |
#Things to do : Log file generation | |
echo -n "SMARTCTL test selection, Enter [short/long]: " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
domain_list='shortlist.txt' | |
declare -a resol | |
resol=('8.8.8.8' '8.8.4.4' '1.1.1.1' '1.0.0.1' '9.9.9.9' '149.112.112.112') #multiple resolvers | |
for domain in `cat $domain_list` | |
do | |
ns_ip=${resol[`shuf -i0-5 -n1`]} #select resolver | |
registrar_detail=`whois $domain | grep -i "registrar:" | tail -n1 | awk '{print $2 $3}' | tr , " "` #fetch registrar. improvement needed |