#!/bin/sh for cell in `cat ~/csdb.list`; do printf ">%s\t\t#%s\n" $cell $cell for hn in `dig +short afsdb $cell | \ sed -E -e 's/^[0-9]+ //' -e 's/\.$//'`; do printf "%s\t\t\t#%s\n" `dig +short a $hn` $hn done done