Hi All,
I've made it exporting some attributes through CLI for a KML file, follows below the script used to do it:
#connect
export CLIMNAMEWIDTH=100
#export CLISESSID=$$
echo "<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.1">
<Folder><name>Lookup addresses</name>" > Test.kml
show devices | awk '{print $1}' | sort | uniq | while read MH; do
IP=$( show attributes attr=0x12d7f mh=$MH | awk '{print $NF}' | grep -v Value )
DEV_LOCATION=$( show attributes attr=0x23000d mh=$MH | awk '{$1=$2=""; print $0}' | grep -v Value | cut -d',' -f1-3)
NAME=$( show attributes attr=0x1006e mh=$MH | awk '{print $NF}' | grep -v Value )
echo "<Placemark>" >> Test.kml
echo "<NAME>$NAME</NAME>" >> Test.kml
echo "<ADDRESS>$DEV_LOCATION</ADDRESS>" >> Test.kml
echo "</Placemark>" >> Test.kml
done
echo "</Folder></kml>" >> Test.kml