Skip to content

Instantly share code, notes, and snippets.

@norbekaiser
Last active July 26, 2016 18:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save norbekaiser/cc1b4397f6b6d67f72286a1f90247e19 to your computer and use it in GitHub Desktop.
Save norbekaiser/cc1b4397f6b6d67f72286a1f90247e19 to your computer and use it in GitHub Desktop.
#!/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
@norbekaiser
Copy link
Author

letzte ts nutzer rausfiletern via shell skript

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment