Try this: #!/bin/bash test=$(dig +short mail.lug.org.uk) dig -x $test Host returned to much info, so I swapped to dig for both parts. Cheers Steve _______________________________________________ Sheffield Linux User's Group http://sheflug.org.uk/mailman/listinfo/sheflug_sheflug.org.uk FAQ at: http://www.sheflug.org.uk/mailfaq.html GNU - The Choice of a Complete Generation