Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 | |
#Check if it is ubuntu or centos | |
if [ -f /etc/os-release ] | |
then | |
. /etc/os-release | |
OS_NAME=`echo $NAME | awk '{print $1}' | tr '[:upper:]' '[:lower:]'` | |
else | |
echo "Unable to get os" | |
exit 1 |
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 | |
. ~dbuser/sqllib/db2profile | |
db2 connect to TEPS | |
db2 "export to /tmp/users.del of del modified by chardel'' coldel@ decpt, select ID,NAME,LSTDATE from KFWUSER" | |
sed s/\'//g /tmp/users.del > /tmp/usersFMT.del | |
rm -f /tmp/users.del | |
HOSTNAME=`hostname` | |
echo "hostname,user ID, user name, last login mm-dd-yyy hh:mm:ss" > /tmp/lastlogin.csv |