This file contains 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
meld <(ssh -q host01.domain.com "cat /etc/postfix/main.cf") <(ssh -q host02.domain.com "cat /etc/postfix/main.cf") |
This file contains 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/ksh | |
function lastpwchg { [ "`whoami`" = "root" ] || { echo "Must be root"; return; }; printf "$1: "; lastupdate=`lsuser -a lastupdate $1 2>/dev/null | awk -F= "{print \\$2}"`; [ -n "$lastupdate" ] && perl -e "print \"Last password change: \" . scalar (localtime($lastupdate)) . \"\n\" " || echo "User does not exist or has no lastupdate attribute"; } | |
#Test with root | |
lastpwchg root |
This file contains 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 | |
# MAIN MAP FOR AL: | |
# http://maps.waterdata.usgs.gov/mapper/index.html?state=al | |
# | |
# 02423414 LITTLE CAHABA RIVER AT CAH BEA RD NR CAHABA HTS AL #Cahaba Beach Road | |
# URL: https://waterdata.usgs.gov/nwis/uv?site_no=02423414 | |
# NOTE: Seems to drop about 3"/hour after peaking. | |
# |
This file contains 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 | |
#STR="Sarah;Lisa;Jack;Rahul;Johnson" #String with names | |
STR=$(cat users.txt) | |
if [ -z $STR ] ; then | |
echo "STR is not set." | |
exit 1 | |
fi |