Last active
July 26, 2016 18:19
-
-
Save norbekaiser/cc1b4397f6b6d67f72286a1f90247e19 to your computer and use it in GitHub Desktop.
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 | |
####PROGS | |
FIND=$(which find) | |
SORT=$(which sort) | |
TAIL=$(which tail) | |
GREP=$(which grep) | |
####ARGS | |
N_ONE="-n1" | |
N_FIVE="-n5" | |
TS_LOCATION="/var/lib/lxc/phunderbird1/rootfs/opt/teamspeak3-server_linux-amd64/logs/" | |
####EXEC | |
ALIAS=$(${FIND} $TS_LOCATION | ${SORT} | ${TAIL} $N_ONE) | |
echo $ALIAS | |
#LEAST RECENTLY USERS | |
cat $ALIAS |${GREP} client | ${GREP} -v query | ${TAIL} $N_FIVE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
letzte ts nutzer rausfiletern via shell skript