#!/usr/bin/env fctool %if {file == ""} file = stdout %endif %if {host == ""} host = {input("host: ")} %endif scanning '{host}' %l running ping: {$("ping -c 3 " ++ host)} %l nameservers: %for line : {$("whois " ++ host)} %if {"Name Server" in line} {nth(line, colon, 1)} %endif %endfor