default is $USER or user is first argument
This commit is contained in:
parent
cdedae5d6d
commit
06d74a3667
1 changed files with 2 additions and 2 deletions
|
@ -4,10 +4,10 @@ F="$(for i in $(find /var/log -maxdepth 1 -name "wtmp*"|sort -h);do echo -n "-f
|
|||
cat << EOF
|
||||
-----
|
||||
Alle Tage mit lokalen Logins
|
||||
User: $USER
|
||||
User: ${1:-$USER}
|
||||
Host: $(hostname)
|
||||
Files: $F
|
||||
-----
|
||||
|
||||
EOF
|
||||
last -F -a $F |grep -v "pts/\|reboot\|wtmp"|awk '$1 == u {print $4,$5,$7}' u=$USER|uniq
|
||||
last -w -F -a $F |grep -v "pts/\|reboot\|wtmp"|awk '$1 == u {print $4,$5,$7}' u=${1:-$USER}|uniq
|
||||
|
|
Loading…
Reference in a new issue