Jeff Layton wrote: > getent hosts <host> | head -1 | cut -d' ' -f1 > > Thoughts? > Minor nitpick, but 'head -n1' would be the POSIXly-correct way to do that. The head -N syntax, despite being widely used, isn't POSIX-compliant.