sort ruining results

+typo
pull/384/head
TheDragonkeeper 2019-06-01 14:04:21 +01:00 committed by GitHub
parent 8440b7416a
commit 4d5530354d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -19,9 +19,9 @@ function GET() {
;; ;;
"TARGET_OS") "TARGET_OS")
DATABASE=/root/udisk/payloads/extensions/OSdatabase DATABASE=/root/udisk/payloads/extensions/OSdatabase
FINGERPRINT=$(cat /var/log/syslog | grep FINGERPRINT | awk '{ print $9 " " $7 }' | sort -u | awk '{ print $2 }' | awk 'END{print}') FINGERPRINT=$(cat /var/log/syslog | grep FINGERPRINT | awk '{ print $9 " " $7 }' | awk '{ print $2 }' | awk 'END{print}')
[[ -f $DATABASE ]] || touch $DATABASE [[ -f $DATABASE ]] || touch $DATABASE
sed -i $FINGERPRINT > /var/log/syslog sed -i $FINGERPRINT /var/log/syslog
if [ -f $DATABASE ] ; then if [ -f $DATABASE ] ; then
TARGET_OS=$(cat $DATABASE | grep $FINGERPRINT | awk '{ print $2 }') TARGET_OS=$(cat $DATABASE | grep $FINGERPRINT | awk '{ print $2 }')
GET TARGET_IP GET TARGET_IP