Skip to content

Instantly share code, notes, and snippets.

@usiusi360
Last active May 22, 2018 06:25
Show Gist options
  • Save usiusi360/000074b4e117cf196fd3806537089534 to your computer and use it in GitHub Desktop.
Save usiusi360/000074b4e117cf196fd3806537089534 to your computer and use it in GitHub Desktop.
#!/bin/bash
while read line
do
SERVERNAME=`echo "$line" | cut -f1`
FAMILY=`echo "$line" | cut -f2`
RELEASE=`echo "$line" | cut -f3`
IPADDRS=`echo "$line" | cut -f4`
sed -i -e s/\"Family\":\"pseudo\"/\"Family\":\"${FAMILY}\"/g \
-e s/\"Release\":\"\"/\"Release\":\"${RELEASE}\"/g \
-e s/\"IPv4Addrs\":null/\"IPv4Addrs\":\"${IPADDRS}\"/g \
results/current/${SERVERNAME}.json
done < hostlist.tsv
@usiusi360
Copy link
Author

usiusi360 commented May 22, 2018

実行順

① vuls scan
② change_hostinfo.sh
③ vuls report -to-syslog

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