Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Korn shell script doubt ???
Name: Balaji Date: July 1, 2002 at 11:47:40 Pacific
Comment:
hi, I have a question. I'm doing a Korn Shell script. I want to find out the list of users who have either logged in or logged out during the period(like 20 minutes or etc). Thank you for helping.(please give any hint)
Name: LANkrypt0 Date: July 1, 2002 at 13:10:17 Pacific
Reply:
hint: man last
and/or
last | sort -k 1 | less
0
Response Number 2
Name: Balaji Date: July 1, 2002 at 13:45:24 Pacific
Reply:
hi LANkrypt0,
Thanks for response . But could u plz use the last 20 minutes that who r logged in or logged out. u didn't mention time. i searched man pages. but i didn't find any info regarding that. could u plz use by time. thanx, balaji
0
Response Number 3
Name: frank Date: July 2, 2002 at 01:34:11 Pacific
Reply:
Balaji,
refer to posting "Login Script"
SearchDate=`date +"%b %d"` last |grep "$SearchDate"|awk '{system (" echo login: " $1 " at " $4,$5,$6 ) } '
or
Luser=`last | head -1` Vuser=$Luser while : do Luser=`last | head -1` if [ "${Luser}" != "${Vuser}" ] then echo $Luser > /tmp/mytmp mail a1xrdb1@cipofdc1 < /tmp/mytmp Vuser=$Luser fi done
Summary: I am trying to write a Korn shell script to use sftp to transfer data from one system to another. I cannot seem to figure out how to send the required password to log on to the remote system. I have t...
Summary: Hi, anyone have any korn shell script that do a recursive files count from parent directory and below? example: /etc/ls -l|wc -l /etc/rc2.d/ls -l|wc -l /etc/rc2.d/a/ls -l |wc -l Thanks ...