Skip to content

Instantly share code, notes, and snippets.

@fat0troll
Last active December 18, 2015 14:49
Show Gist options
  • Select an option

  • Save fat0troll/5799957 to your computer and use it in GitHub Desktop.

Select an option

Save fat0troll/5799957 to your computer and use it in GitHub Desktop.
#!/bin/bash
#список номеров заносится в файл
echo "Enter file name" #имя файла в котором список номеров
read FILE
while read number
do
login=`inf -r $number | awk '$2 ~ /ep/ {print $2}' >> /dev/null` #определение логина
sleep 10
killall inf
date=`left $login 1 | awk '{FS = "|"}{ print $7}' | awk 'NR == 4 {print $1}'` #определение даты последнего выхода в сеть
echo $login" worked at "$date >> logins
echo $login" worked at "$date
done < $FILE
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment